我有500个文件和他们的文件大小。现在我想把它们放在CSV文件中。
Name size A.jpg 16.3 B.jpg 310.11
我已经在两个列表中转换了名称和价值。
Result=[] for i in name: for j in value: Result.append(zip(i,j)) print(Result)
它不起作用
xdnvmnnf1#
import pandas as pd read_file = pd.read_csv (r'Path where the Text file is storedFile name.txt') read_file.to_csv (r'Path where the CSV will be savedFile name.csv', index=None)
1条答案
按热度按时间xdnvmnnf1#