Python & R- feather package - 如何更改默认写入目录?

Python & R- feather package - How to change default write directory?

谷歌搜索 1+ 小时后我放弃了。在这里,我的 objective 存储了来自 R 的羽毛文件和 Python 不同的字典(默认 "C:\Users\murali" 除外)。 我正在为 R 和 Python

使用 Jupyter 笔记本

非常感谢您的帮助!!

R码

library(feather)
path <- "my_data.feather5"
write_feather(mtcars, path)
df <- read_feather(path)

Python编码

import feather
import pandas as pd
import numpy as np
arr = np.random.randn(10000) # 10% nulls
arr[::10] = np.nan
df = pd.DataFrame({'column_{0}'.format(i): arr for i in range(10)})
feather.write_dataframe(df, 'test.feather')

R中(将工作目录设置为新的默认值):

setwd("C:\Users\murali")

Python中:

os.chdir("C:\Users\murali")