tegge-classroom / STAT2984-2018

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

assignment 4 #36

Open mbecker3 opened 6 years ago

mbecker3 commented 6 years ago

On number one, I can figure out the categories by looking at the headers that are printed, but it is a lot messier than I think it should be. My code looks like this and I can't figure out why it's not giving me a simple answer: filename = "hurricanes-2015.txt" f = open(filename,'r').readlines() header = f[0].strip().split('\t') print header

nanaa9 commented 6 years ago

Use '\r' for the split

matter698no2 commented 6 years ago

the .split('\t') should work, just change 'r' to 'rU'.