Skip to content

Commit bb64ac9

Browse files
jwkvamwesm
authored andcommitted
parse change_pct as a float instead of a string
1 parent a3f2974 commit bb64ac9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/io/data.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,11 @@ def get_quote_yahoo(symbols):
9595

9696
for line in lines:
9797
fields = line.strip().split(',')
98-
#print fields
9998
for i,field in enumerate(fields):
100-
if field[0] == '"':
99+
# assumes change_pct is in the 5th index
100+
if i == 5:
101+
data[header[i]].append(float(field.strip('"%')))
102+
elif field[0] == '"':
101103
data[header[i]].append( field.strip('"'))
102104
else:
103105
try:

0 commit comments

Comments
 (0)