Spaces:
Runtime error
Runtime error
File size: 494 Bytes
17e4491 ccbaa73 17e4491 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import pandas as pd
def create_dataframe(file_path):
# Read the CSV file into a Pandas dataframe
df = pd.read_csv(file_path)
# Create dynamic filters for each field
filters = {}
for col in df.columns:
filters[col] = df[col].unique().tolist()
return df, filters
if __name__ == '__main__':
file_path = 'Carddata.csv'
df, filters = create_dataframe(file_path)
print('Dataframe:')
print(df)
print('\nFilters:')
print(filters)
|