本文介绍了Julia Dataframes 与 Python pandas 的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用 python pandas 并想知道是否有办法将 pandas 中的数据输出到 julia Dataframes 中,反之亦然.(我认为你可以用 Pycall 从 Julia 调用 python,但我不确定它是否适用于数据帧)有没有办法从 python 调用 Julia 并让它接收 pandas 数据帧?(不保存为另一种文件格式,如 csv)

I am currently using python pandas and want to know if there is a way to output the data from pandas into julia Dataframes and vice versa. (I think you can call python from Julia with Pycall but I am not sure if it works with dataframes) Is there a way to call Julia from python and have it take in pandas dataframes? (without saving to another file format like csv)

什么时候使用 Julia Dataframes 比 Pandas 更有利,而不是非常大的数据集和运行具有许多循环的东西(如神经网络)?

When would it be advantageous to use Julia Dataframes than Pandas other than extremely large datasets and running things with many loops(like neural networks)?

推荐答案

所以有一个为此开发的库

So there is a library developed for this

PyJulia 是一个使用 Python 2 和 3 与 Julia 交互的库

PyJulia is a library used to interface with Julia using Python 2 and 3

https://github.com/JuliaLang/pyjulia

这是实验性的,但有些工作

It is experimental but somewhat works

其次,Julia 还有一个 pandas 的前端,即 pandas.jl

Secondly Julia also has a front end for pandas which is pandas.jl

https://github.com/malmaud/Pandas.jl

它看起来只是 pandas 的包装器,但您也许可以使用 julia 的并行功能执行多个功能.

It looks to be just a wrapper for pandas but you might be able to execute multiple functions using julia's parallel features.

至于哪个更好,目前 pandas 根据这个 在 Julia 中读取 csv 比 Python 慢

As for the which is better so far pandas has faster I/O according to this reading csv in Julia is slow compared to Python

这篇关于Julia Dataframes 与 Python pandas 的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 05:16