import pandas as pd
import os
import glob
all_data = []hddd.dddddโ ๋ ๋ ๋จ์๋ฅผ ๋์ฑ ์ธ๋ถํ ํ๊ธฐ ์ํด ๋ ๋จ์์ ์์ ์๋ฆฌ๊น์ง ํํํ ํํ
# table = ์ขํ๋ฅผ ๊ณ์ฐํด์ผ ํ ํ
์ด๋ธ ๋ช
# x, y = table์์ x, y ์ปฌ๋ผ ๋ช
, 'x','y'๋ก ๋ฃ์ด์ค๋ค
def hddd_to_wgs84(table,x,y):#-*-coding:utf-8
import psycopg2
import pandas as pd
import numpy as np
import csv
import sql
from sqlalchemy import create_engine# ํจํค์ง ๋ถ๋ฌ์ค๊ธฐ
#-*-coding:utf-8
import psycopg2
import pandas as pd
import csv
import sql
from sqlalchemy import create_enginepython reํจํค์ง๋ฅผ ์ด์ฉํ์ฌ ํ๊ธ ์์, ํ๊ธ ๋ชจ์, ํน์๋ฌธ์, ์ด๋ชจํฐ์ฝ ์ญ์ ํ๊ธฐ
import re
def get_clean_text(df):selenium์ ์ด์ฉํ์ฌ ์ ํ๋ธ ๋๊ธ ํฌ๋กค๋งํ๊ธฐ
- ํค์๋ ์ ๋ ฅ ํ ๊ฒ์๋๋ ์์์ ์ ๋ชฉ, url, ์ ๋ณด๋ฅผ ์์งํ์ฌ ๋ฐ์ดํฐํ๋ ์ ๋ฐ csv๋ก ์ ์ฅ
- ์ ์ฅ๋ url์ ์กฐํํ์ฌ ์์์ ๋๊ธ์ ์์งํ์ฌ ๋ฐ์ดํฐ ํ๋ ์ ๋ฐ csv๋ก ์ ์ฅ
- ๋ชจ๋ ๋๊ธ์ 1๊ฐ์ csv๋ก ์ ์ฅ
# -*- coding:utf-8 -*-import re
def clean_blank(text):
cleaned_text = text.lstrip() #์ผ์ชฝ ๊ณต๋ฐฑ ์ ๊ฑฐ
cleaned_text = cleaned_text.rstrip() #์ค๋ฅธ์ชฝ ๊ณต๋ฐฑ ์ ๊ฑฐ
return cleaned_text```
df.loc[df_mapo['col_name'].str.contains('words', na= False)]
- RandomUnderSampler: random under-sampling method
- TomekLinks: Tomekโs link method
- CondensedNearestNeighbour: condensed nearest neighbour method
- OneSidedSelection: under-sampling based on one-sided selection method
- EditedNearestNeighbours: edited nearest neighbour method
- NeighbourhoodCleaningRule: neighbourhood cleaning rule
- RandomOverSampler: random sampler
NewerOlder