I have a nested list of strings:
station_data = [['65.29', 3003', 'station1'], ['81.23', '8000', 'station2'], ['77.33', '3500', 'station3']] etc...
I am trying to type cast the first position [0] of each list from string to float
I am trying to type cast the second position [1] of each sub list from string to int
I have tried different for loops, but for the life of me I cannot seem to get the syntax right
station_data can be modified, or a new list can be created, fine either way.
Desired output should look like:
station_data_processed = [[65.29, 3003, 'station1'], [81.23, 8000, 'station2'], [77.33, 3500, 'station3']]
Any suggestions are a huge help, thank you!