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
  Camelot not able to change column header shortmeister1 2 658 Mar-22-2025, 04:47 AM
Last Post: Pedroski55
  Transform 3 Columns into Single Column DaveG 9 3,454 Mar-19-2025, 03:46 AM
Last Post: robbert23
  renaming a column without a name in a dataframe Carbonpony 2 750 Jan-23-2025, 08:20 AM
Last Post: Carbonpony
  Updating column name with translation bobbydave 0 1,046 Sep-17-2024, 03:40 PM
Last Post: bobbydave
  Error coming while downloding url rgargmv 0 1,565 Aug-13-2024, 09:28 AM
Last Post: rgargmv
  adding a calculated column charles986 1 859 Jun-13-2024, 05:31 PM
Last Post: deanhystad
  adding a calculated column charles986 1 669 Jun-13-2024, 02:27 PM
Last Post: deanhystad
  Adding PD DataFrame column bsben 2 1,274 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 1,877 Feb-17-2024, 05:53 PM
Last Post: klllmmm
  Help copying a column from a csv to another file with some extras g0nz0uk 3 1,668 Feb-01-2024, 03:12 PM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

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