这可能很容易,但是在过去几个小时在线查看文档和可能的示例之后,我无法弄清楚。
我有一个大型数据集(电子表格),它被 DO 文件大量清理。然后,在 DO 文件中,我想将清理后的数据的某些变量保存为临时 .csv,运行一些 Python 脚本,生成新的 CSV,然后将该输出附加到清理后的数据中。
如果不清楚,这里是一个例子。
After cleaning my data set (XYZ) goes from variables A to Z with 100 observations. I want to take variables A and D through F and save it as test.csv. I then want to run a python script that takes this data and creates new variables AA to GG. I want to then take that information and append it to the XYZ dataset (making the dataset now go from A to GG with 100 observations) and then be able to run a second part of my DO file for analysis.
我一直在手动执行此操作,这很好,但文件将开始快速更改,这将为我节省大量时间。