Home
restato's memo
Cancel

[Python] 쿠팡 이미지, 상품명, 가격 스크랩

https://www.coupang.com/vp/products/5585680852?itemId=119183238&vendorItemId=3240941688&src=1191000&spec=10999999&addtag=400&ctag=5585680852&lptag=CFM60714948&itime=2021...

[Airflow] MySQL 연동

mysql에서 데이터베이스 생성 CREATE DATABASE airflow CHARACTER SET utf8 COLLATE utf8mb4_unicode_ci; CREATE USER 'airflow' IDENTIFIED BY 'airflow'; GRANT ALL PRIVILEGES ON airflow.* TO 'airflow'; --이미 설정되서...

[Python] Streamlit ValueError: variable encoding field is specified without a type; the type cannot be inferred because it does not match any column in the data.

ValueError: variable encoding field is specified without a type; the type cannot be inferred because it does not match any column in the data. df.columns = [x for x in df.columns] 정확한 이유는 모르겠지만....

[Python] 부동산 실거래 매매 건수 확인 (분당구)

오늘은 여기까지 현재 분당구를 기준으로 최근 1년, 3년, 6년 ,10년의 실거래 매매 건수를 확인 가능하도록 구성 # header가 잘림 data.columns = [x +'\t' for x in data.columns] streamlit에서 한글 버그가 있는건지 그냥 dataframe을 st.dataframe(df)로 작성하면 header...

[Python] Pandas DataFrame to_sql 데이터 중복시 무시하는 방법

pandas dataframe을 sql로 넣을때 to_sql을 사용하는데 중복이 발생하는 경우 IntegrityError: (1062, "Duplicate entry '46409004' for key 'PRIMARY'") 가 발생하면서 에러가 난다. to_sql의 경우 https://pandas.pydata.org/docs/reference/api/p...

[Python] 부동산 동별로 거래 건수 확인

def preprocessing(df: pd.DataFrame) -> pd.DataFrame: # preprocessing df['transaction_amount'] = df['transaction_amount'].astype(float) df['transaction_date'] = pd.to_datetime( ...

Mysql Without Duplicate

CREATE TABLE `transcripts` ( `ensembl_transcript_id` varchar(20) NOT NULL, `transcript_chrom_start` int(10) unsigned NOT NULL, `transcript_chrom_end` int(10) unsigned NOT NULL, PRIMARY KEY (`ensemb...

[Python] Matplotlib 스타일 지정하기

가능한 스타일 확인 import matplotlib.pyplot as plt print(plt.style.available) # ['Solarize_Light2', '_classic_test_patch', 'bmh', 'classic', 'dark_background', 'fast', 'fivethirtyeight', 'ggplot', 'graysc...

[Python] 공공데이터 부동산 실거래 가져오기

def get_data(url, rcode, ym, svc_key): print("service_key", svc_key) querystring = { "pageNo":"1", "startPage":"1", "numOfRows":"99999", "pageSize":"10", ...

[Python] Pandas에서 NaN인 로우 가져오기

df[df['floor'].isna()] 데이터 cleansing 을 할때는 def cleansing(df: pd.DataFrame) -> pd.DataFrame: print('*** NaN ***') print(df.isna().sum()) print('*** null ***') print(df.isnull()...