250x250
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 |
Tags
- 리눅스
- GPU
- postgre
- oracle
- 파이썬
- 교차검증
- 연결
- docker
- 도커이미지
- Linux
- 쿼리
- psycopg2
- 도커
- 복구
- Jupyter
- 오라클
- jupyternotebook
- TensorFlow
- Memory
- Docker image
- psql
- pgadmin
- GridSearchCV
- SQL
- 시계열
- sqldeveloper
- LOG
- Python
- cpu
- 머신러닝
Archives
- Today
- Total
areum
[NLP] 텍스트 Emoji(이모티콘) 제거하는 방법 본문
728x90
텍스트 Emoji(이모티콘) 제거하는 방법
1. dataframe의 예시를 만들어 test 해보았습니다.
# 기본 데이터
from pandas import DataFrame
raw_data = {'user_id': [1, 2, 3, 4],
'chat': ['apple😊😇', 'grape🧡💛💚💙💜', 'banana', 'cherry']}
df = DataFrame(raw_data)
2. 이모티콘 제거 함수 생성
import emoji
from tqdm import tqdm
def remove_emoji(df):
for i in tqdm(df.index):
df.loc[i, 'chat'] = emoji.replace_emoji(df.loc[i, 'chat'], replace='')
return df
'Programming > NLP' 카테고리의 다른 글
[NLP] 형태소 분석하기(feat. KoNLPy) (0) | 2023.03.30 |
---|---|
[NLP] 텍스트 카테고리 분류하는 방법 (0) | 2023.03.29 |