UnicodeEncodeError: 'ascii' exporting csv in pandas python 2.7 -
i've created pandas dataframe in python 2.7
when try export csv function
outcome.to_csv("/users/john/out_1.csv")
i following error:
unicodeencodeerror: 'ascii' codec can't encode character u'\u2019' in position 191: ordinal not in range(128)
how can export it? , if can't how go position 191 , remove character?
many thanks
edit:
the dataframe looks like:
0 ca0037381 lsal:g97715947cf ca0037381lsal:g97715947cf 1 ca0037381 lsal:g97717947cf ca0037381lsal:g97717947cf 2 ca0037684 hint:13426cf ca0037684hint:13426cf 3 ca0037679 wave:jla0901brncf ca0037679wave:jla0901brncf 4 ca0037373 hugr:5026134836266cf ca0037373hugr:5026134836266cf 5 ca0037601 wast:wgch23blcf ca0037601wast:wgch23blcf 6 ca0037601 wast:wg19800cf ca0037601wast:wg19800cf 7 ca0037318 endo:albarino ca0037318endo:albarino 8 ca0037319 heav:xyg001acf ca0037319heav:xyg001acf 9 ca0037319 twos:4782-20twocf ca0037319twos:4782-20twocf 10 ca0037320 sere:bd635/a ca0037320sere:bd635/a 11 ca0037321 casg:12285cf ca0037321casg:12285cf
note: tiny fraction since 16330 rows x 372 columns. dataset sparse (i.e. many blank cells)
Comments
Post a Comment