Skip to content Skip to sidebar Skip to footer

Reading Rpt Files With Pandas

I read rpt data to pandas by using: import pandas as pd df = pd.read_fwf('2014-1.rpt', skiprows=[1], nrows=150) I actually follow the anwser here However, for some columns, sepera

Solution 1:

This question is old, but here is an answer. You can read it as a csv using pandas. I have used this for a variety of rpt files and it has worked.

import pandas as pd
df = pd.read_csv("2014-1.rpt", skiprows=[1], nrows=150)

Post a Comment for "Reading Rpt Files With Pandas"