일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- 라즈베리파이
- MySQL
- Excel
- pandas
- ubuntu
- 다이어트
- MS-SQL
- IOS
- Unity
- 유니티
- flutter
- GIT
- 날짜
- python
- port
- PyQt
- 리눅스
- tensorflow
- ASP
- Linux
- swift
- mssql
- javascript
- node.js
- sqlite
- urllib
- 맛집
- PER
- 함수
- PyQt5
목록2025/04 (11)
아미(아름다운미소)
import sysimport osimport pandas as pdimport pyarrow as paimport pyarrow.parquet as pqimport jsonfrom PyQt5.QtWidgets import ( QApplication, QMainWindow, QTableView, QFileDialog, QVBoxLayout, QWidget, QPushButton, QLabel, QStatusBar, QMessageBox, QLineEdit, QHBoxLayout, QComboBox, QHeaderView, QProgressDialog)from PyQt5.QtCore import ( Qt, QAbstractTableModel, QSortFilterProxyMode..
import sysimport osimport pandas as pdimport pyarrow as paimport pyarrow.parquet as pqimport jsonimport tracebackfrom concurrent.futures import ThreadPoolExecutorfrom PyQt5.QtWidgets import ( QApplication, QMainWindow, QTableView, QFileDialog, QVBoxLayout, QWidget, QPushButton, QLabel, QStatusBar, QMessageBox, QLineEdit, QHBoxLayout, QComboBox, QHeaderView, QProgressDialog, QCheckBox..
pip install pyarrow pandas PyQt5==5.15.4 PyQt5-sip==12.8.1 PyQt5==5.15.2pyinstaller --onefile --hidden-import=fastparquet --noconsole parquet_redy.pya = Analysis( ['parquet_viewer.py'], pathex=[], binaries=[], datas=[], hiddenimports=[ 'fastparquet', 'fastparquet.speedups', # fastparquet의 C 확장 모듈 'pandas', 'pyarrow' ], hookspath=[], hooksconfi..
try: s3.put_object(...)except Exception as e: print(f"Error: {e.response['Error']['Code']}") # AccessDenied, KMS.Disabled 등
import pandas as pd# Parquet 파일 읽기df = pd.read_parquet('example.parquet')# 전체 데이터 출력print("전체 데이터:")print(df)# 상위 5행 출력print("\n상위 5행:")print(df.head())# 데이터 구조 확인print("\n데이터 구조:")print(df.info())# 기술 통계 정보print("\n기술 통계:")print(df.describe())
import yaml# YAML 파일 로드with open('config.yml') as f: config = yaml.safe_load(f)# 값 접근print(config['app']['name']) # "My Awesome App"print(config['database']['production']['credentials']['username']) # "admin"# 리스트 항목 접근for feature in config['app']['features']: print(feature)app: name: "My Awesome App" version: 2.3.1 features: - "authentication" - "data_export" - "notification..
DB_HOST: localhostDB_PORT: 3306DB_USER: rootDB_PASSWORD: secret import yamlwith open("env.yml", "r") as f: config = yaml.safe_load(f)print(config["DB_HOST"])
IAM → 사용자 → 해당 사용자 클릭 → "권한" 탭 → 정책 추가AmazonS3FullAccess 또는 최소 다음 권한 포함:콘솔에서 권한 확인하는 방법1. AWS 콘솔 접속: https://console.aws.amazon.com/2. 좌측 상단 검색창에 IAM 입력 → 이동3. 좌측 "사용자" 클릭4. → 코드에서 조회된 사용자 이름 클릭5. → "권한" 탭 확인6. AmazonS3FullAccess 또는 아래 정책이 있어야 boto3로 S3 접근 가능:{ "Effect": "Allow", "Action": [ "s3:ListBucket", "s3:GetObject", "s3:PutObject", "s3:DeleteObject" ], "Resource": [ "a..
예제1import pandas as pd# --------------------------------------------# 1. 샘플 데이터 생성# --------------------------------------------df = pd.DataFrame({ 'a': [1, 2, 3, 4], 'b': ['A', 'B', 'C', 'D'], 'c': [10, 20, 30, 40]})df2 = pd.DataFrame({ 'a': [1, 2, 3, 5], 'b': ['A', 'X', 'C', 'E'], 'c': [10, 20, 30, 50]})# --------------------------------------------# 2. 비교 방법 구현# ------------..
최적화 최존def process_dataframe_optimized(dict_df_types, df): type_handlers = { 'int': lambda s: pd.to_numeric(s, errors='coerce').fillna(0).astype('int32'), 'float': lambda s: pd.to_numeric(s, errors='coerce').fillna(0).astype('float32'), # float32로 변경 'bool': lambda s: s.astype(str).str.lower().isin(['true', 't', '1']), # 더 넓은 불리언 조건 'datetime': lambda s: pd.to_dat..