2

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?

1201ProgramAlarm
  • 32,384
  • 7
  • 42
  • 56
Felix
  • 1,539
  • 8
  • 20
  • 35

1 Answers1

6

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')
arustictop
  • 76
  • 1
  • 6
  • Thank you, Seems to be working. Making work much easier. Appreciate help and sorry for delayed response. – Felix Dec 24 '17 at 07:01