Mar-29-2019, 05:35 PM
Hi,
Is there any way to properly load and write fixed width file into a dataframe using Pandas?
I'm trying to load a fixed width file using pandas read_fwd as below, but the spaces are getting trimmed now.
Can you guys please suggest any solution for this issue?
Is there any way to properly load and write fixed width file into a dataframe using Pandas?
I'm trying to load a fixed width file using pandas read_fwd as below, but the spaces are getting trimmed now.
1 |
input_df = pd.read_fwf( 'fwfile' , widths = [ 24 , 4 , 59 , 28 , 2 , 12 , 121 ], skiprows = 0 , parse_dates = True , dtype = str ) |