Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- PyQt
- Linux
- GIT
- pandas
- tensorflow
- 리눅스
- 유니티
- 다이어트
- javascript
- 맛집
- urllib
- MS-SQL
- IOS
- swift
- PyQt5
- ubuntu
- 함수
- 날짜
- Unity
- mssql
- flutter
- python
- sqlite
- PER
- 라즈베리파이
- ASP
- MySQL
- Excel
- port
- node.js
Archives
목록2025/05/26 (2)
아미(아름다운미소)
Polars type 변경
import polars as pldef process_dataframe_optimized_pl(dict_df_types: dict, df: pl.DataFrame) -> pl.DataFrame: def handle_column(col: str, dtype: str) -> pl.Expr: try: expr = pl.col(col) if dtype == 'int': return expr.cast(pl.Int32).fill_null(0).alias(col) elif dtype == 'float': return expr.cast(pl.Float32).fill_null(0).alia..
카테고리 없음
2025. 5. 26. 13:49
object 타입 컬럼을 모두 문자열(str)로 변환
import pandas as pddef convert_object_columns_to_str(df: pd.DataFrame) -> pd.DataFrame: """ Pandas DataFrame에서 object 타입 컬럼을 모두 문자열(str)로 변환합니다. Parameters: df (pd.DataFrame): 변환할 DataFrame Returns: pd.DataFrame: 문자열 컬럼이 str 타입으로 변환된 DataFrame """ df = df.copy() for col in df.select_dtypes(include='object').columns: df[col] = df[col].astype(str) ..
랭귀지/pandas
2025. 5. 26. 12:33