本文整理汇总了Python中joblib.Parallel.columns方法的典型用法代码示例。如果您正苦于以下问题:Python Parallel.columns方法的具体用法?Python Parallel.columns怎么用?Python Parallel.columns使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类joblib.Parallel
的用法示例。
在下文中一共展示了Parallel.columns方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_training_data
# 需要导入模块: from joblib import Parallel [as 别名]
# 或者: from joblib.Parallel import columns [as 别名]
def create_training_data():
num_cores = 8
# getting total number of trips
list_of_files = [[folder, f.replace('.csv','')] for folder in os.listdir('drivers') if 'DS_Store' not in folder
for f in os.listdir('drivers/'+folder) if '.csv' in f]
raw_data = Parallel( n_jobs=num_cores )(delayed(create_attributes)(i) for i in list_of_files)
raw_data = pd.DataFrame(raw_data)
raw_data.columns = ['driver_trip','trip_time','total_distance','skyway_distance','avg_speed','std_speed',
'avg_speed_up','avg_speed_down',
'avg_acc','std_acc','avg_turn','std_turn','standing_time','standing_speed']
# save to file for later training
raw_data.to_csv('training_set.csv', index=False)
return raw_data