3

I am struggling to read SAS JMP files with Pandas read_csv function into Pandas dataframe. Does anyone have experience with this type of data file? What is the most efficient way?

2 Answers 2

7

This has worked for me. Its results are sometimes a bit unexpected (for example, sometimes I get CSVs without headers, even though in JMP they have them). Unfortunately, you need to have SAS JMP installed and this solution only works on Windows.

import pandas as pd
from win32com.client import Dispatch

jmp = Dispatch("JMP.Application")
doc = jmp.OpenDocument('sasjmpfile.jmp')
doc.SaveAs('sasjmpfile.csv')

df = pd.read_csv('sasjmpfile.csv')
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you, Seems to be working. Making work much easier. Appreciate help and sorry for delayed response.
0

One option is to use Julia language package JMPReader.jl. Assuming juliacall and pandas packages are installed

from juliacall import Main as jl
jl.seval("using JMPReader")
df = jl.readjmp("example1.jmp")
pt = jl.pytable(df, "pandas")

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.