Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a C/C++ API for python pandas? [closed]

Tags:

python

c

pandas

api

I'm extracting mass data from a legacy backend system using C/C++ and move it to Python using distutils. After obtaining the data in Python, I put it into a pandas DataFrame object for data analysis. Now I want to go faster and would like to avoid the second step.

Is there a C/C++ API for pandas to create a DataFrame in C/C++, add my C/C++ data and pass it to Python? I'm thinking of something that is similar to numpy C API.

I already thougth of creating numpy array objects in C as a workaround but i'm heavily using timeseries data and would love to have the TimeSeries and date_range objects as well.

like image 686
THM Avatar asked Jul 23 '12 06:07

THM


People also ask

Does pandas use C code?

pandas uses C extensions (mostly written using Cython) to speed up certain operations. To install pandas from source, you need to compile these C extensions, which means you need a C compiler.

Is pandas an API or library?

pandas documentation pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language.

Is Panda an API?

PANDA's API is designed to allow you to programmatically import (and, to a lesser extent, export) data from PANDA. In this tutorial we will show you how you can use the PANDA API to pull data froma web scraper into PANDA..

Can we use pandas in C++?

The Pandas data frames are pure Python classes, so they are not easy to construct from C/C++, but the underlying data storage of the individual columns (see class Series source) is numpy 1D array.


1 Answers

There is now a C++ library that is equivalent to Pandas package in terms of interface and functionality. See this article in Linkedin "https://www.linkedin.com/pulse/pythons-pandas-c-update-hossein-moein/" The open source code is in "https://github.com/hosseinmoein/DataFrame"

like image 143
hmoein Avatar answered Oct 06 '22 01:10

hmoein