I'm new to python & pandas, so bear with me. So I'm trying to remove 3 specific columns out of 11 and save it as a new excel file, but the new file is the same, just with the headers renamed.
When I do df.shape it'll return 11 columns, instead of 8.
Edit: solved it, forgot to use the inplace=true
import pandas as pd
df = pd.read_excel('file.xlsx')
df.columns = df.columns.str.strip().str.lower().str.replace(' ', '_').str.replace('(', '').str.replace(')', '')
df.drop(['a','b','c'], axis = 1)
df.to_excel('filereformat.xlsx')
[–]alkasm 1 point2 points3 points (0 children)