Julia Dataframes 与 Python pandas

2023-10-19Python开发问题
2

本文介绍了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 的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

在xarray中按单个维度的多个坐标分组
groupby multiple coords along a single dimension in xarray(在xarray中按单个维度的多个坐标分组)...
2024-08-22 Python开发问题
15

Pandas中的GROUP BY AND SUM不丢失列
Group by and Sum in Pandas without losing columns(Pandas中的GROUP BY AND SUM不丢失列)...
2024-08-22 Python开发问题
17

pandas 有从特定日期开始的按月分组的方式吗?
Is there a way of group by month in Pandas starting at specific day number?( pandas 有从特定日期开始的按月分组的方式吗?)...
2024-08-22 Python开发问题
10

GROUP BY+新列+基于条件的前一行抓取值
Group by + New Column + Grab value former row based on conditionals(GROUP BY+新列+基于条件的前一行抓取值)...
2024-08-22 Python开发问题
18

PANDA中的Groupby算法和插值算法
Groupby and interpolate in Pandas(PANDA中的Groupby算法和插值算法)...
2024-08-22 Python开发问题
11

PANAS-基于列对行进行分组,并将NaN替换为非空值
Pandas - Group Rows based on a column and replace NaN with non-null values(PANAS-基于列对行进行分组,并将NaN替换为非空值)...
2024-08-22 Python开发问题
10