delete unnamed coloumns in pandas code example
Example 1: remove column from dataframe
df.drop('column_name', axis=1, inplace=True)
Example 2: delete unnamed coloumns in pandas
# Best method so far.
df = df.loc[:, ~df.columns.str.contains('^Unnamed')]
Example 3: get rid of unnamed column pandas
df.to_csv(path, index=False)
Example 4: pandas dataframe delete column
del df['column_name']
Example 5: remove a column from dataframe
del df['column_name'] #to remove a column from dataframe