This could be easier one but this one is bugging me for a while. Help would be greatly appreciated.
Problem Definition: Make the list output looks good by removing the unicode value prefixed to the data.
Here is my code:
nfl = np.genfromtxt("drinks.csv", dtype="<U75", skip_header=1, delimiter=",")
print(nfl)
output is as follows:
[[u'Afghanistan' u'0' u'0' u'0' u'0.0']
[u'Albania' u'89' u'132' u'54' u'4.9']
[u'Algeria' u'25' u'0' u'14' u'0.7']
[u'Andorra' u'245' u'138' u'312' u'12.4']
[u'Angola' u'217' u'57' u'45' u'5.9']]
I also tried to print it like print(str(nfl)).No luck!How would I modify the output?
What I wanted to see is
[['Afghanistan' '0' '0' '0' '0.0']
['Albania' '89' '132' '54' '4.9']
['Algeria' '25' '0' '14' '0.7']
['Andorra' '245' '138' '312' '12.4']
['Angola' '217' '57' '45' '5.9']]