Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Transposing Table
#3
If this is not an assignment, you can use pandas.
The code would be something like this:

import pandas as pd
data = pd.read_csv('your_file.csv', sep=' ') # check additional options,e.g. header, etc. 
data.T # rotated data
data.T.to_csv('output.csv') # save rotated data to a file
Reply


Messages In This Thread
Transposing Table - by salihozturk - Mar-02-2019, 01:24 AM
RE: Transposing Table - by DeaD_EyE - Mar-02-2019, 06:35 AM
RE: Transposing Table - by salihozturk - Mar-03-2019, 06:55 PM
RE: Transposing Table - by scidam - Mar-02-2019, 07:13 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Transposing a dataframe without creating NaN values doug2019 2 984 Mar-18-2023, 03:14 PM
Last Post: jefsummers
  Transposing a Matrix WITHOUT numpy TreasureDragon 5 11,196 Mar-02-2019, 10:48 PM
Last Post: ichabod801
  Transposing in Excel and converting to txt muhsin 2 2,860 Dec-10-2017, 06:06 PM
Last Post: muhsin

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020