간단한 csv 파일을 읽으려면 pandas read_csv를 사용합니다. 그러나, 나는 이유를 이해하지 못하는 ValueError: could not convert string to float:
을 가지고있다.python pandas read_csv 천 단위 구분 기호가 작동하지 않습니다.
코드는 단순히
rawdata = pd.read_csv(r'Journal_input.csv' ,
dtype = { 'Base Amount' : 'float64' } ,
thousands = ',' ,
decimal = '.',
encoding = 'ISO-8859-1')
이다 그러나 나는이 오류를 얻을
pandas\parser.pyx in pandas.parser.TextReader.read (pandas\parser.c:10415)()
pandas\parser.pyx in pandas.parser.TextReader._read_low_memory (pandas\parser.c:10691)()
pandas\parser.pyx in pandas.parser.TextReader._read_rows (pandas\parser.c:11728)()
pandas\parser.pyx in pandas.parser.TextReader._convert_column_data (pandas\parser.c:13162)()
pandas\parser.pyx in pandas.parser.TextReader._convert_tokens (pandas\parser.c:14487)()
ValueError: could not convert string to float: '79,026,695.50'
, 026,695.50 '부유하는 '79의 문자열을 변환 할 때 어떻게이 가능한 오류를 얻을 수 있습니까? 이미 두 가지 옵션을 지정했습니다
thousands = ',' ,
decimal = '.',
팬더의 코드 또는 버그가 문제입니까?
당신은 질문 파일의 내용을 추가 할 수 있습니까? 또는 파일을 gdocs, dropbox에 업로드하는 것이 더 좋습니다. 데이터가 신중하지 않은 경우? – jezrael
문제의 행 사본을 제공 할 수 있습니까? – IanS