Pandas DataFrame: How to remove column and perform calculations on select columns
Just needed to drop the column and then drop duplicates. Sorry all.
df.drop(columns="lineItemBudget", inplace=True)
df.drop_duplicates(inplace=True)
I have a DataFrame with 57 columns. Columns 1 through 21 are dimensions. 22 through 57 are metrics. Column 1 is a date column. Column 21 is a bad column that is causing me to have duplicative data.
What I am looking to do is remove column 21 and then take the min of 22 to 57 when 1 through 20 are the same.