Extract csv file specific columns to list in Python

前端 未结 3 2048
既然无缘
既然无缘 2020-12-07 16:12

What I\'m trying to do is plot the latitude and longitude values of specific storms on a map using matplotlib,basemap,python, etc. My problem is that I\'m trying to extract

3条回答
  •  一向
    一向 (楼主)
    2020-12-07 16:36

    import csv
    from sys import argv
    
    d = open("mydata.csv", "r")
    
    db = []
    
    for line in csv.reader(d):
        db.append(line)
    
    # the rest of your code with 'db' filled with your list of lists as rows and columbs of your csv file.
    

提交回复
热议问题