Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- df = pd.read_csv('music_log_upd_col.csv')
- # меняем пустые ячейки на unknown
- df['track_name'] = df['track_name'].fillna('unknown')
- df['artist_name'] = df['artist_name'].fillna('unknown')
- # удаляем строки с пустым жанром
- df = df.dropna(subset=['genre_name'])
- print(df)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement