Spaces:
Sleeping
Sleeping
File size: 507 Bytes
48fbeda |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import pandas as pd
import pickle
# Convert DataFrame pickles to CSV
pickle_files = ['newdf3.pkl', 'predictorsscale.pkl', 'newpredictors.pkl',
'train_predictors_val.pkl', 'newfifa.pkl', 'df3scaled.pkl']
for file in pickle_files:
try:
df = pd.read_pickle(file)
csv_file = file.replace('.pkl', '.csv')
df.to_csv(csv_file, index=True)
print(f"Converted {file} to {csv_file}")
except Exception as e:
print(f"Error converting {file}: {str(e)}") |