所以我不知道如何将此代码创建的csv保存到目录中的特定文件夹中。任何帮助都将不胜感激!
#Store rows which do not conform to the relationship in a new dataframe
subset = df[df['check_total_relationship'] == False]`
subset.to_csv('false_relationships.csv', index=False, header=True, encoding='utf-8')`
只需指定目录中的文件夹。
或者您可以指定绝对路径
如果需要连接路径,可以使用
os.path