Python Forum
Need help | splitting list into list
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help | splitting list into list
#1
Hello,

My need is to read an excel, split data from a specific column , turn it into array of characters so that i print them into excel into 9 cells and color few characters.

Below is my approach so far. If incorrect, please rectify.

1 Read data from excel file [Done]
2 Put column data into a list as below [Done]

for row in range( 1, sheet.nrows ):
    data.append( sheet.cell_value( row, 2 ) ) # Append data from excel to list
2 Read this list and split each element into an array itself.Below doesn't work for me
for i in data:
    for j in range( len( i ) ):
        split_data.append(list( data[j]  ))
3 Once splitting , print them into excel
<No idea how to achieve this.I tried a lot from google about various python module but in vain. Lastly, i am seeking help here>

4 Future need : color the character 0 and O in excel sheet
<didn't reached there so far but any help on this would be thankful>

Thanks
V
Reply


Messages In This Thread
Need help | splitting list into list - by Vinci141 - Mar-12-2019, 02:53 PM
RE: Need help | splitting list into list - by Yoriz - Mar-12-2019, 06:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Strange behavior list of list mmhmjanssen 3 478 May-09-2024, 11:32 AM
Last Post: mmhmjanssen
  No matter what I do I get back "List indices must be integers or slices, not list" Radical 4 1,382 Sep-24-2023, 05:03 AM
Last Post: deanhystad
  Delete strings from a list to create a new only number list Dvdscot 8 1,761 May-01-2023, 09:06 PM
Last Post: deanhystad
  List all possibilities of a nested-list by flattened lists sparkt 1 1,021 Feb-23-2023, 02:21 PM
Last Post: sparkt
  Сheck if an element from a list is in another list that contains a namedtuple elnk 8 2,040 Oct-26-2022, 04:03 PM
Last Post: deanhystad
Question Keyword to build list from list of objects? pfdjhfuys 3 1,717 Aug-06-2022, 11:39 PM
Last Post: Pedroski55
  Split a number to list and list sum must be number sunny9495 5 2,470 Apr-28-2022, 09:32 AM
Last Post: Dexty
  Splitting strings in list of strings jesse68 3 1,898 Mar-02-2022, 05:15 PM
Last Post: DeaD_EyE
  How to check if a list is in another list finndude 4 1,966 Jan-17-2022, 05:04 PM
Last Post: bowlofred
  Different out when using conda list and pip list Led_Zeppelin 1 4,220 Jan-14-2022, 09:30 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

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