Created
March 3, 2023 11:05
-
-
Save ben-n93/8312996fb3ffe186deeeda31432cb2dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
df = pd.read_csv("./data/horror_films.csv") | |
df.drop_duplicates(inplace=True) | |
table = pd.pivot_table(data=df,index='Setting', values='Film', aggfunc='count') | |
table.to_csv("./data/cleaned_horror_films.csv") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment