tegge-classroom / STAT2984-2018

STAT 2984: Statistical Programming I - Spring 2018
1 stars 13 forks source link

Assignment 4 question #28

Closed bdonovan7 closed 6 years ago

bdonovan7 commented 6 years ago

Does anyone know how to extract column names and create a list of lists for the data and a dictionary of lists for the data for the assignment? I copied the code from the housing prices data and changed it to fit the hurricane data, but it did not work.

ategge commented 6 years ago

When you say the code did not work, do you mean you received an error or the output was not what you expected? If the first, please include the error message.

bdonovan7 commented 6 years ago

I got an error message. It says could not convert string to float: '-----'

maxh95 commented 6 years ago

You can use if statements I believe. For example: if name != "-----": name_list.append(name)

This helps deal with your missing values in the data. It doesn't quite answer your question about reading data to a list of lists or dictionary but that is how I dealt with that issue when I had it.