I have a info.txt file it looks like this:
B 19960331 00100000 00000000000000 00000000000000 00000000000000 00000000 00000000000000 00000000000000 00000000000000
B 19960430 00099100 00000000000000 00000000000000 00000000000000 00000000 00000000000000 00000000000000 00000000000000
B 19960531 00098500 00000000000000 00000000000000 00000000000000 00000000 00000000000000 00000000000000 00000000000000
And when I use pandas to read it:
import pandas as pd
import numpy as np
df =pd.read_csv('C:\Users\Petter\Desktop\info.txt')
df
and the output is:
B 19960331 00100000 00000000000000 00000000000000 00000000000000 00000000 00000000000000 00000000000000 00000000000000
0 B 19960430 00099100 00000000000000 00000000000...
1 B 19960531 00098500 00000000000000 00000000000...
The rows are far right from the column name,is there anyway I can make them like this:
B 19960331 00100000 00000000000000 00000000000000 00000000000000 00000000 00000000000000 00000000000000 00000000000000
0 B 19960430 00099100 00000000000000 00000000000...
1 B 19960531 00098500 00000000000000 00000000000...
I tried:
df.shift(periods=1, axis="columns")
but now work