我想打开每个客户文件夹,然后从csv中提取数据并进行连接。我还想创建一个包含该客户id的列,该id是文件夹的名称。rootdir = '..glob.glob(os.path.join(mycsvdir, 'surveys.csv'))
# loop through the files and read them in with pandasdataframes = [] # a list to hold all the individual
我需要创建能够读取多个csv文件的代码,在文件中查找常见标题的列,并在数组中提取它们。我正在用作为数据帧导入的.csv文件填充python字典,以便能够在for循环中调用它们。但是,我不知道for循环从dict的每一项中提取列会是什么样的。到目前为止,我的代码如下:import matplotlib.pyplot as plt
r= int(input('Howprint(d) ##prints dict to v