feather helper是一个用于缓存numpy数组和pandas数据帧的简洁接口。

featherhelper的Python项目详细描述


羽毛辅助对象

feather helper是一个用于缓存和加载numpy数组和pandas数据帧的简洁接口。我和Pandoctools/Knitty一起使用。

内容

安装

通过Conda:

conda install -c defaults -c conda-forge featherhelper

通过PIP:

pip install featherhelper

用法示例

importpandasaspdimportnumpyasnpimportfeatherhelperasfhfh.setdir("~/feather/mydoc")# (optional)# fh.exc(1, 2)  # force raise exceptions for names (optional)# %%fh.name(1)# can also be fh.name('id1'), default is 'default', 1 is the same as '1'try:# raise fh.Err  # (optional)df,A,B=fh.pull()# control length can be set: fh.pull(N)exceptfh.Err:# calculate:print('push')df=pd.DataFrame(np.random.random(16).reshape(4,4))A=df.valuesB=np.random.random(16*3).reshape(4,2,2,3)#fh.push(df,A,B)print(df,'\n',A,'\n',B)

一个简短的例子:

importnumpyasnpimportfeatherhelperasfh# fh.exc()# %%try:A=fh.pull()exceptfh.Err:A=np.random.random(16).reshape(4,4)fh.push(A)

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
在java Swing中检测重叠对象   java JAXB,xs:any和targetNamespace   JavaFX中的java按钮操作以错误的顺序执行   java Android显示所有已安装应用的应用选择器   在Java中,有没有比仿射变换更有效的旋转图像的方法?   java Play 2.4.6,为测试中的字节码增强配置生成设置   java无法在片段中的图像滑块中获取图像   在java中尝试MD5哈希   Android studio应用程序能否读取Java桌面应用程序序列化的数据类?   无法强制转换java自定义类   自定义Arraylist中的java Split 2列csv字符串   java Spring自定义请求上下文   java在安卓应用程序运行期间,如何检查网络状态是否发生变化?   java是否应该更改HTTP客户端以获得来自服务器的异步响应?   java使用TableModel来保存和处理数据,或者让它只显示对象(内容)   java如何获取麦克风/扬声器名称?   java Android从另一个类更新布局   通过Java RXTX与空调制解调器进行串行到串行通信?