import pandas as pd
df1 = pd.read_csv("/path_to/all.csv",encoding='utf-8')
nodeDataList = list(df1.groupby(['QCC']))
for nodeData in nodeDataList:
nodeData[1].to_csv('/path_to/' + str(nodeData[0])+ '.csv')
import pandas as pd
df1 = pd.read_csv("/path_to/all.csv",encoding='utf-8')
nodeDataList = list(df1.groupby(['QCC']))
for nodeData in nodeDataList:
nodeData[1].to_csv('/path_to/' + str(nodeData[0])+ '.csv')
本文标题:2021-10-18-使用python脚本对要求列内容拆分某个文
本文链接:https://www.haomeiwen.com/subject/dfdooltx.html
网友评论