您是否愿意帮我找到以下问题的解决方案:
我有一个很大的csv文件,当我试图取消它时,我的电脑内存不足。所以我用chunk。但是当我试图融化每个块时,加入另一个df
wb_test_4_chunk = pd.read_csv('fin_test.csv', chunksize = 2)
merged_table = pd.DataFrame(columns = ['id', 'ac', 'idp', 'starttime', 'endtime', 'Question', 'VALUE', 'Description'])
merged_table
for chunk in wb_test_4_chunk:
wb_test_melt = pd.melt(wb_test_4_chunk, id_vars = ['id', 'ac', 'idp', 'starttime', 'endtime'] , var_name = 'Question', value_name = 'VALUE')
merged_chunk = pd.merge(wb_test_melt, df_dict, how ='inner', on = 'Question' )
merged_table = merged_table.append(merged_chunk, ignore_index=True)
这会产生错误
'TextFileReader' object has no attribute 'copy'.
提前感谢您的帮助!