Pandas Dataframe에서 URL Decode
from urllib.parse import unquote
import pandas as pd
example = ['%EC%95%88%EB%85%95%ED%95%98%EC%84%B8%EC%9A%94',
'%EC%95%84%EB%A6%84%EB%8B%B5%EB%84%A4%EC%9A%94',
'%ED%8C%8C%EC%9D%B4%EC%8D%AC']
df = pd.DataFrame(example, columns=['url'])
# URL Decode
df['url'] = df.url.apply(lambda x : unquote(x))
print(df)
---------------------------------------------------------------
url
0 안녕하세요
1 아름답네요
2 파이썬
'Python > Python For Analytics' 카테고리의 다른 글
[Python] pandas 중복값 처리 (duplicates, drop_duplicates) (0) | 2020.04.08 |
---|---|
[Python] Pandas iis-log DataFrame 접속자IP 국가식별 컬럼 추가 (0) | 2020.02.28 |
[Python] split을 이용하여 pandas 컬럼 분리하기 (0) | 2020.02.25 |
[Python] replacement of Pandas dataframe NaN value (0) | 2020.02.16 |
[Python] numpy.where 를 이용하여 컬럼을 다양한 데이터 타입과 비교 (0) | 2020.01.21 |
[Python] pandas dataframe 리스트로 변환 (0) | 2019.10.30 |
[Python] numpy setdiff1d(차집합)을 이용한 2개의 텍스트 파일 비교 (0) | 2019.10.30 |
[Python] pandas rank를 이용한 순위 표시 (0) | 2019.10.28 |