Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converter returning string passed to read_csv causes exception #583

Closed
wesm opened this issue Jan 6, 2012 · 0 comments
Closed

Converter returning string passed to read_csv causes exception #583

wesm opened this issue Jan 6, 2012 · 0 comments
Labels
Milestone

Comments

@wesm
Copy link
Member

wesm commented Jan 6, 2012

for example:

        data = """Id;Number1;Number2;Text1;Text2;Number3
1;1521,1541;187101,9543;ABC;poi;4,738797819
2;121,12;14897,76;DEF;uyt;0,377320872
3;878,158;108013,434;GHI;rez;2,735694704"""
        f = lambda x : x.replace(",", ".")
        converter = {'Number1':f,'Number2':f, 'Number3':f}
        df2 = read_csv(StringIO(data), sep=';',converters=converter)
@wesm wesm closed this as completed in cd4636b Jan 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant