# Pandas (Python), Tablesaw (Java) like library in Haxe

**URL:** <https://community.haxe.org/t/pandas-python-tablesaw-java-like-library-in-haxe/2847>\
**Category:** Haxe\
**Created:** [January 15, 2021, 3:11am UTC](https://community.haxe.org/t/pandas-python-tablesaw-java-like-library-in-haxe/2847 "2021-01-15T03:11:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tsurubaso](https://community.haxe.org/user_avatar/community.haxe.org/tsurubaso/32/1398_2.png) [@tsurubaso](https://community.haxe.org/u/tsurubaso)\
**Post date:** [January 15, 2021, 3:11am UTC](https://community.haxe.org/t/pandas-python-tablesaw-java-like-library-in-haxe/2847/1 "2021-01-15T03:11:20Z")

</div>

Hello to all,  
everything is in the title,  
I use those 2 libraries a lot.  
Python  
[https://pandas.pydata.org/](https://pandas.pydata.org/)  
Java

> **[jtablesaw/tablesaw](https://github.com/jtablesaw/tablesaw)**
>
> Java dataframe and visualization library. Contribute to jtablesaw/tablesaw development by creating an account on GitHub.

Is there an equivalent in Haxe???

Edit:  
I know that we can use other languages in haxe.

This is one of the charm of this language. But I just don’t know how to do that yet.

then we should use this…

//https://api.haxe.org/lua/Table.html

may be…

---

<div class="post-metadata">

**Author:** ![alex\_dja](https://community.haxe.org/user_avatar/community.haxe.org/alex_dja/32/294_2.png) [@alex\_dja](https://community.haxe.org/u/alex_dja)\
**Post date:** [January 15, 2021, 4:35pm UTC](https://community.haxe.org/t/pandas-python-tablesaw-java-like-library-in-haxe/2847/2 "2021-01-15T16:35:35Z")

</div>

Haxe doesn’t have its own runtime. It mainly just transpiles its source code to a target source or byte code. So you can use an external library you like for a target you chose via the haxe extern conсeption [Externs - Haxe - The Cross-platform Toolkit](https://haxe.org/manual/lf-externs.html). But take your notice the target runtime can’t be differ from the lib runtime in that case.

---

<div class="post-metadata">

**Author:** ![tsurubaso](https://community.haxe.org/user_avatar/community.haxe.org/tsurubaso/32/1398_2.png) [@tsurubaso](https://community.haxe.org/u/tsurubaso)\
**Post date:** [January 16, 2021, 2:42am UTC](https://community.haxe.org/t/pandas-python-tablesaw-java-like-library-in-haxe/2847/3 "2021-01-16T02:42:11Z")

</div>

First A great thank @alex_dja  
Before giving comment on you nice answer I have to explain my situation,  
I am some kind of Dinosaur that had to use Java and Python to help my work.  
I was in a “learn to code or die” situation. As you can guess, I am coding now.  
Then I have no bases. I can do things, but I actually don’t understand all the concepts.  
This is for Java and Python.

For Haxe, I will say I have no rational explanation to explain why this language is so interesting for me. A lot to do with Armory and Blender may be, but that’s an other story.  
My wish is to use it for work, I am not into game (sadly), then I am trying to transcript all that I have done in Python and Java into Haxe…And may be give it a sexy UI.

Then, and sorry for this long contextual response, but so to say that…  
I hardly understand your answer.  
And I will do what that is best to do…  
I will try to interpret your answer to see If I get it right.

Edit:

> Haxe doesn’t have its own runtime.

[Runtime definition](https://techterms.com/definition/runtime#:~:text=Runtime%20is%20the%20period%20of,most%20often%20in%20software%20development.)

This part I have difficulty to grasp.

> It mainly just transpiles its source code to a target source or byte code.

Target source like Java or Python Ok…

[Bytecode](https://techterms.com/definition/bytecode#:~:text=Bytecode%20is%20program%20code%20that,is%20recognized%20by%20the%20processor.)

> But take your notice the target runtime can’t be differ from the lib runtime in that case.

I guess that If I use Python libraries, it will not work if my target is Java.

Then, If I understood well, and please redirect me if I am mistaking,  
you have a project you use say Haxeui and some Python library like Pandas.  
You export it to Python.

Then…How to do that will be an other question I guess…

---

<div class="post-metadata">

**Author:** ![alex\_dja](https://community.haxe.org/user_avatar/community.haxe.org/alex_dja/32/294_2.png) [@alex\_dja](https://community.haxe.org/u/alex_dja)\
**Post date:** [January 16, 2021, 10:03am UTC](https://community.haxe.org/t/pandas-python-tablesaw-java-like-library-in-haxe/2847/4 "2021-01-16T10:03:08Z")

</div>

> [Runtime definition](https://techterms.com/definition/runtime#:~:text=Runtime%20is%20the%20period%20of,most%20often%20in%20software%20development.)

I mean if you want to use an external library with haxe you should keep in mind the runtime environment your result code will run in.

> [Bytecode](https://techterms.com/definition/bytecode#:~:text=Bytecode%20is%20program%20code%20that,is%20recognized%20by%20the%20processor.)

Yes, haxe can also produce bytecode, e.g. _jvm_ or _hl_ target [https://hashlink.haxe.org](https://hashlink.haxe.org)

> Then, If I understood well, and please redirect me if I am mistaking,  
> you have a project you use say Haxeui and some Python library like Pandas.  
> You export it to Python.

If haxeui library supports python target(possibly it doesn’t) you can use it with Pandas lib and the result of compilation will be python sources.

---

<div class="post-metadata">

**Author:** ![tsurubaso](https://community.haxe.org/user_avatar/community.haxe.org/tsurubaso/32/1398_2.png) [@tsurubaso](https://community.haxe.org/u/tsurubaso)\
**Post date:** [January 16, 2021, 11:13am UTC](https://community.haxe.org/t/pandas-python-tablesaw-java-like-library-in-haxe/2847/5 "2021-01-16T11:13:18Z")

</div>

Thanks! for all your explanations

---

<div class="post-metadata">

**Author:** ![alex\_dja](https://community.haxe.org/user_avatar/community.haxe.org/alex_dja/32/294_2.png) [@alex\_dja](https://community.haxe.org/u/alex_dja)\
**Post date:** [January 16, 2021, 1:22pm UTC](https://community.haxe.org/t/pandas-python-tablesaw-java-like-library-in-haxe/2847/6 "2021-01-16T13:22:35Z")

</div>

You are welcome. Another point should be mentioned in cross target haxe lib development is conditional compilation [Conditional Compilation - Haxe - The Cross-platform Toolkit](https://haxe.org/manual/lf-condition-compilation.html)

```haxe
package ui.table;

typedef Table = 
#if java
	ui.table.java.TableImpl;
#elseif python
	ui.table.python.TableImpl;
#end

```

usage:` final table = new ui.table.Table();`
