#Read
df = pd.read_csv('zenkoku.csv', low_memory=False)
#Delete column
df = df.drop("Office flag", axis=1)
#Rename column
df = df.rename(columns={'Change before':'After change'})
#Add column
df = df.assign('Column name'='value')
#output(No index)
df.to_csv('zenkoku2.csv', index=False)
Recommended Posts