Convert commas decimal separators to dots within a Dataframe

前端 未结 3 445
清酒与你
清酒与你 2020-11-27 19:07

I am importing a CSV file like the one below, using pandas.read_csv:

df = pd.read_csv(Input, delimiter=\";\")

Example of CSV f

3条回答
  •  天涯浪人
    2020-11-27 19:30

    pandas.read_csv has a decimal parameter for this: doc

    I.e. try with:

    df = pd.read_csv(Input, delimiter=";", decimal=",")
    

提交回复
热议问题