# When you have many columns, and only want to keep a few: # drop columns which are not needed. # df = pandas.Dataframe() columnsToKeep = ['column_1', 'column_13', 'column_99'] df_subset = df[columnsToKeep] # Or: df = df[columnsToKeep]