kenanlian
2/28/2019 - 2:52 AM

[data frame add or drop column] some expression to modify data frame columns #Pandas

[data frame add or drop column] some expression to modify data frame columns #Pandas

import pandas as pd

df = pd.read_csv("")
df.drop([column name], axis=1, inplace=True) # drop col
df[column name] = pd.Series(np.zeros(df.shape[0]), dtype=int, index=df.index) # add all 0 col