<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to convert Python Pandas dataFrame to jmp format without saving it as files? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/516258#M74282</link>
    <description>&lt;P&gt;Hello!&amp;nbsp; I know this is a 4 year old post now,&amp;nbsp; and I am new users in the JMP community... but for our use cases,&amp;nbsp; the solution presented here to the original post is not comprehensive for our needs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We would like to have a server running Python only (not JMP / JSL) be able to do all data pulling and preparations / transformations,&amp;nbsp; then be able to serialize the data (without a local file write) and send the data back to a client in a form directly readable in JMP.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our data is larger... may be say,&amp;nbsp; 100k to 1M rows... and 10 to 100 columns...&amp;nbsp;It is heterogenous (numeric and categorical) and may contain missing values.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do any of the DataFrame.to_() methods support this?&amp;nbsp; Those pandas method can be written and IO buffer rather than a file to save time, and then network transfer to the JMP client?&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The leading candidates formats that we would want to work are the .to_parquet(), to_hdf(),&amp;nbsp; to_feather() .&amp;nbsp; Looks like pandas has a to_stata() method that writes to the "Stata" format.&amp;nbsp; Not sure of the JSL (SAS) is something that is open enough where Pandas could implement it someday (may be low on the list there).&amp;nbsp; Parquet seems to be universal these days,&amp;nbsp; and pandas also has Arrow "Table" type as a first class type as well,&amp;nbsp; so that is intriguing to us as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We would want to avoid formats that require re-parsing data and assignment of data types (numeric,&amp;nbsp; categorical,&amp;nbsp; date_time... ... so .to_csv() and to_json() or other text formats are not really useful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for reading through the post,&amp;nbsp; and let me know if I should have started a new thread,&amp;nbsp; rather than replying to this one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Randall&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jun 2022 15:29:17 GMT</pubDate>
    <dc:creator>GoodwinJMP</dc:creator>
    <dc:date>2022-06-30T15:29:17Z</dc:date>
    <item>
      <title>How to convert Python Pandas dataFrame to jmp format without saving it as files?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/58173#M32298</link>
      <description>&lt;P&gt;I know JMP support "Python Interface" function within JMP script envirornment. But somtimes it will be better to do co-work independently Python&amp;nbsp;engineer and JMP one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In our case, Python engineer read database files with DB interface, and makes pre-process with Pandas library, and wants to convert JMP format because JMP enginner need only JMP format data in order to do data analysis and post-process with JSL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you imagine, the bottleneck is how to convert Python Pandas dataFrame without saving it as files. The easiest way is to save files and read it as jmp format&amp;nbsp;but it takes many times to save and read them. I'd like to know where&amp;nbsp;there is any library to convert Python Pandas dataFrame to jmp format directly in memory or not.&lt;/P&gt;</description>
      <pubDate>Fri, 25 May 2018 05:45:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/58173#M32298</guid>
      <dc:creator>Kwangki</dc:creator>
      <dc:date>2018-05-25T05:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Python Pandas dataFrame to jmp format without saving it as files?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/58194#M32309</link>
      <description>&lt;P&gt;if the files are small and fit on the clipboard, then you could just save the data frame to the clipboard and paste it from the clipboard into JMP.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is an example from a Discovery Summit Talk:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.jmp.com/t5/Discovery-Summit-2017/Leveraging-Python-and-REST-to-Introduce-SAS-Viya-TM-Processing/ta-p/44078" target="_blank"&gt;https://community.jmp.com/t5/Discovery-Summit-2017/Leveraging-Python-and-REST-to-Introduce-SAS-Viya-TM-Processing/ta-p/44078&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
path=Get Current Directory();
dt1=Open("$SAMPLE_DATA/Big Class.jmp");
current data table(dt1);
dt1&amp;lt;&amp;lt; Bring Window To Front;
main menu("Copy With Column Names");

text="\[
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd

df=pd.read_clipboard(sep='\\s+')
size= (df.height * df.weight)/df.age ** .5
ax = plt.subplot(111, projection='polar')
c = plt.scatter(df.height, df.weight, c=df.age, s=size, cmap=plt.cm.hsv)
c.set_alpha(0.55)#transparency
plt.show()
]\";

path=Get Current Directory();
save text file(path||"graph.py", text);

x = RunProgram(
    executable( "/Users/user1/anaconda/bin/python" ),
    options(path||"graph.py")
    ,readfunction("blob")
 
);
close(dt1, nosave);//this executes as soon as the graph window is closed
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 May 2018 11:25:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/58194#M32309</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2018-05-25T11:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Python Pandas dataFrame to jmp format without saving it as files?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/58264#M32333</link>
      <description>&lt;P&gt;Thank you for your advice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if possible, I'd like to know how to tranfer directly into jmp format which JSL(JMP Script Language)&amp;nbsp;recognizes dataFrame data within JSL envirornment. It means that JSL recognize Pandas dataFrame as like JMP one. The reason is that ,in my case, I can do almost all of JSL automation work&amp;nbsp;if I can start it from JMP data format.&lt;/P&gt;</description>
      <pubDate>Sat, 26 May 2018 04:16:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/58264#M32333</guid>
      <dc:creator>Kwangki</dc:creator>
      <dc:date>2018-05-26T04:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Python Pandas dataFrame to jmp format without saving it as files?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/58313#M32336</link>
      <description>&lt;P&gt;In jmp 14 TThere are some new funciotns for getting and sending things with Python.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I haven't been able to use them yet.&lt;/P&gt;
&lt;P&gt;There is a function called Python Get(name) that might work.&lt;/P&gt;</description>
      <pubDate>Sun, 27 May 2018 23:53:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/58313#M32336</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2018-05-27T23:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Python Pandas dataFrame to jmp format without saving it as files?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/61039#M33172</link>
      <description>&lt;P&gt;Can I ask for details of converting Python Pandas dataFrame&amp;nbsp;to jmp&amp;nbsp;format with saving it as files?&lt;/P&gt;&lt;P&gt;I wish to mine data as Pandas dataFrames&amp;nbsp;and save them as a format that JMP can read easily for further investigations.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jun 2018 22:27:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/61039#M33172</guid>
      <dc:creator>taless</dc:creator>
      <dc:date>2018-06-24T22:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Python Pandas dataFrame to jmp format without saving it as files?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/61041#M33174</link>
      <description>&lt;P&gt;One method for doing this would be to&amp;nbsp;convert the&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Python Pandas dataFrame to a JSL version of a JMP table.&amp;nbsp; This is a fully supported and documented form of a JMP data table.&amp;nbsp; And it will allow you to include any of the Columm Properties and row states etc.&amp;nbsp; To see examples of what you would need to do, all you have to do is to point to any existing JMP data table and ask JMP to generate the script that will recreate the table.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 00:10:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/61041#M33174</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-06-25T00:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Python Pandas dataFrame to jmp format without saving it as files?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/516258#M74282</link>
      <description>&lt;P&gt;Hello!&amp;nbsp; I know this is a 4 year old post now,&amp;nbsp; and I am new users in the JMP community... but for our use cases,&amp;nbsp; the solution presented here to the original post is not comprehensive for our needs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We would like to have a server running Python only (not JMP / JSL) be able to do all data pulling and preparations / transformations,&amp;nbsp; then be able to serialize the data (without a local file write) and send the data back to a client in a form directly readable in JMP.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our data is larger... may be say,&amp;nbsp; 100k to 1M rows... and 10 to 100 columns...&amp;nbsp;It is heterogenous (numeric and categorical) and may contain missing values.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do any of the DataFrame.to_() methods support this?&amp;nbsp; Those pandas method can be written and IO buffer rather than a file to save time, and then network transfer to the JMP client?&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The leading candidates formats that we would want to work are the .to_parquet(), to_hdf(),&amp;nbsp; to_feather() .&amp;nbsp; Looks like pandas has a to_stata() method that writes to the "Stata" format.&amp;nbsp; Not sure of the JSL (SAS) is something that is open enough where Pandas could implement it someday (may be low on the list there).&amp;nbsp; Parquet seems to be universal these days,&amp;nbsp; and pandas also has Arrow "Table" type as a first class type as well,&amp;nbsp; so that is intriguing to us as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We would want to avoid formats that require re-parsing data and assignment of data types (numeric,&amp;nbsp; categorical,&amp;nbsp; date_time... ... so .to_csv() and to_json() or other text formats are not really useful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for reading through the post,&amp;nbsp; and let me know if I should have started a new thread,&amp;nbsp; rather than replying to this one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Randall&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2022 15:29:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/516258#M74282</guid>
      <dc:creator>GoodwinJMP</dc:creator>
      <dc:date>2022-06-30T15:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Python Pandas dataFrame to jmp format without saving it as files?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/518722#M74479</link>
      <description>&lt;P&gt;I guess you could use JMP's "open Database" command or Query Builder to pull data directly from the data base. You would need an ODBC driver for the data base. After connecting to the data base you could submit a query in SQL to retrieve your data in JMP. &amp;nbsp;Query Builder would let you graphically &amp;nbsp;write the SQL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CSV is a pretty common type of data transport file, so I wouldn't abandon that so quickly. Also JMP multithread reads text and csv files so they open fairly quickly. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 18:24:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/518722#M74479</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2022-07-07T18:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Python Pandas dataFrame to jmp format without saving it as files?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/518756#M74483</link>
      <description>&lt;P&gt;To_Json with Orient=table might be a good choice. It does need to convert from binary to text and back again. JMP's JSON wizard should handle it fairly directly. Using CSV with the multiple file import might actually be fast enough. It will use all of your CPU processors to load the columns in parallel when JMP is importing them. It might be too slow on the server end depending how it's implemented.&lt;BR /&gt;I did roll my own binary to binary transfer in the &lt;LI-MESSAGE title="Beowulf, Newton, and Mr Hanson" uid="345094" url="https://community.jmp.com/t5/Uncharted/Beowulf-Newton-and-Mr-Hanson/m-p/345094#U345094" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-blog-thread lia-fa-icon lia-fa-blog lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp; blog post, sometime back. It used numpy to output a block of binary data from Python code, and blob to matrix function in JSL to load the binary data back in. That worked well because the data was all numeric.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 08:04:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/518756#M74483</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2022-07-08T08:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Python Pandas dataFrame to jmp format without saving it as files?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/518814#M74487</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/982"&gt;@Craige_Hales&lt;/a&gt;&amp;nbsp; you-da man Craig : )&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 21:02:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/518814#M74487</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2022-07-07T21:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Python Pandas dataFrame to jmp format without saving it as files?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/518952#M74503</link>
      <description>&lt;P&gt;JSON formats are too many to handle.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 07:50:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/518952#M74503</guid>
      <dc:creator>lwx228</dc:creator>
      <dc:date>2022-07-08T07:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Python Pandas dataFrame to jmp format without saving it as files?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/563627#M77643</link>
      <description>&lt;P&gt;Thanks for the post back.&amp;nbsp; &amp;nbsp;Would love to be able to simply open a .parquet file directly with JMP.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We already use DB connections to fetch data,&amp;nbsp; but there are so many inefficiencies in using .csv in a full data pipelines (extraction writing,&amp;nbsp; storing,&amp;nbsp; reading),&amp;nbsp; we'd love to start using parquet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 19:55:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-Python-Pandas-dataFrame-to-jmp-format-without/m-p/563627#M77643</guid>
      <dc:creator>GoodwinJMP</dc:creator>
      <dc:date>2022-11-02T19:55:09Z</dc:date>
    </item>
  </channel>
</rss>

