Python Forum
Openpyxl -Coming up with a single column from a multi column data set
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Openpyxl -Coming up with a single column from a multi column data set
#1
Hello,

I am just starting with manipulating xlsx data sets with openpyxl. How would I start looking at selecting/using openpyxl commands to select one column at a time and placing each of the columns data underneath the 1st one? Then I would like to eliminate duplicates, but still keep it within one column.

Each data column will end with an empty cell

Column1, Column2, Column3, .....ColumnN ( no more than 30 columns)
1230, Robert, Car
Robert, 1230, Car
Alfred, 3456, empty
Richard, empty, empty

etc.

Result Below:

Column1
1230
Robert
Alfred
Richard
3456
Car

..
Etc.

Thank you for any feedback.
Reply
#2
Try out with below documentation,
https://openpyxl.readthedocs.io/en/stable/

People will help, when you come up with issues. Forum is not a place to ask for coding to your requirement.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Adding PD DataFrame column bsben 2 241 Mar-08-2024, 10:46 PM
Last Post: deanhystad
  Get an average of the unique values of a column with group by condition and assign it klllmmm 0 220 Feb-17-2024, 05:53 PM
Last Post: klllmmm
  Help copying a column from a csv to another file with some extras g0nz0uk 3 403 Feb-01-2024, 03:12 PM
Last Post: DeaD_EyE
  Converting column of values into muliple columns of counts highland44 0 205 Feb-01-2024, 12:48 AM
Last Post: highland44
  Python code to set column width 1418 11 940 Jan-20-2024, 07:20 AM
Last Post: Pedroski55
  Python Alteryx QS-Passing pandas dataframe column inside SQL query where condition sanky1990 0 686 Dec-04-2023, 09:48 PM
Last Post: sanky1990
  Returning Column and Row Data From Spreadsheet knight2000 0 412 Oct-22-2023, 07:07 AM
Last Post: knight2000
  Find a string from a column of one table in another table visedwings049 8 1,084 Sep-07-2023, 03:22 PM
Last Post: deanhystad
  DF value by Column... not sure what to call it tester_V 2 532 Aug-26-2023, 06:56 PM
Last Post: tester_V
  python sqlite autoincrement in primary column janeik 6 1,075 Aug-13-2023, 11:22 AM
Last Post: janeik

Forum Jump:

User Panel Messages

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