使用Pandas合并/组合kdd2009数据集

时间:2017-05-31 16:37:56

标签: python pandas

我正在尝试合并KDD 2009数据集,如下所示,您可以看到有4个数据帧

df_a = pd.read_table( 'orange_large_train.data.chunk1')

df_b = pd.read_table('orange_large_train.data.chunk2')

df_c = pd.read_table( 'orange_large_train.data.chunk3')

df_d = pd.read_table('orange_large_train.data.chunk4')

frames = [df1, df2, df3,df4, df5 ]

orange_kdd_data = pd.concat(frames)

我收到以下错误,有人可以帮忙吗?

C:\Users\User\Miniconda3\lib\site-packages\pandas\core\internals.py in concatenate_join_units(join_units, concat_axis, copy)
   4909         raise AssertionError("Concatenating join units along axis0")
   4910 
-> 4911     empty_dtype, upcasted_na = get_empty_dtype_and_na(join_units)
   4912 
   4913     to_concat = [ju.get_reindexed_values(empty_dtype=empty_dtype,

C:\Users\User\Miniconda3\lib\site-packages\pandas\core\internals.py in get_empty_dtype_and_na(join_units)
   4898         return np.dtype('m8[ns]'), tslib.iNaT
   4899     else:  # pragma
-> 4900         raise AssertionError("invalid dtype determination in get_concat_dtype")
   4901 
   4902 

AssertionError: invalid dtype determination in get_concat_dtype

0 个答案:

没有答案