Skip to content

Instantly share code, notes, and snippets.

@klintan
Created August 21, 2016 21:42
Show Gist options
  • Save klintan/3b1fa27ea2983e585d40c47b60395be0 to your computer and use it in GitHub Desktop.
Save klintan/3b1fa27ea2983e585d40c47b60395be0 to your computer and use it in GitHub Desktop.
Data preparation of the Fligh fuel prediction challenge on Crowdanalytiz https://www.crowdanalytix.com/contests/predict-fuel-flow-rate-of-airplanes-during-different-phases-of-a-flight
#data preparation
import pandas as pd
import numpy as np
from os import listdir
from os.path import isfile, join
#training file folder (All your csv data files)
file_path = 'CAX_Train'
PH_data_one = pd.DataFrame()
files = [f for f in listdir(file_path) if isfile(join(file_path, f))]
for idy, file_iter in enumerate(files):
print "File no " + str(idy) + " of "+ str(len(files))
data = pd.read_csv('CAX_Train/'+ file_iter)
PH_one = data['PH'] == 1
PH_data_one = PH_data_one.append(data[PH_one])
PH_data_one.to_pickle('PH_data_one.df')
@klintan
Copy link
Author

klintan commented Mar 15, 2023

Hello! yes please send me an email and i'll pass it to you.

@MalikHAwan
Copy link

Thank you for the help! - mhuz503@gmail.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment