def compile_stocks():
list_of_reports = glob.glob(os.path.join(raw, '*.csv'))
list_ = []
for file in list_of_reports:
print(file)
if not os.path.isfile(file):
continue
df = pd.read_csv(file, low_memory=False, error_bad_lines=False)
df['Name'] = os.path.basename(file).split('.')[0]
# df = df.apply(str)
print(df.head())
list_.append(df)
df = pd.concat(list_, sort=False)
# df = df.sort_values(by='Date',ascending=True)
print(df.head())
return df
我正在尝试编译多个csv文件,但出现此错误:
numpy.core._exceptions.UFuncTypeError:ufunc'add'不包含签名匹配类型为(dtype('