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
- sqldeveloper
- SQL
- Linux
- 리눅스
- 도커
- docker
- oracle
- Memory
- postgre
- 연결
- psql
- Python
- 시계열
- cpu
- 파이썬
- jupyternotebook
- pgadmin
- psycopg2
- 교차검증
- 오라클
- 복구
- GPU
- 쿼리
- 도커이미지
- 머신러닝
- Jupyter
- LOG
- Docker image
- TensorFlow
- GridSearchCV
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 |