receiving columns in single column like this: abc| xyz| pqr| qqq
and there related values in row in single cell.
I want to format it like using pandas
abc xyz pqr qqq
and there related values under them
receiving columns in single column like this: abc| xyz| pqr| qqq
and there related values in row in single cell.
I want to format it like using pandas
abc xyz pqr qqq
and there related values under them
As Datanovice already mentioned, it looks like you need to specify the delimiter.
I added index_col and names to make the df even cleaner (guessed on your example).
df = pd.read_csv(your_file, sep="|", index_col=False, names=['colA', 'colB', 'colC', 'colD'])