我在从csv文件导入一些数据时遇到困难.
Input from csv file (extract):
Speed;A
[rpm];[N.m]
700;-72,556
800;-58,9103
900;-73,1678
1000;-78,2272
Code:
import pandas as pd
inT = "test.csv"
df = pd.read_csv(inT, sep = ";", decimal = ',')
print(df)
df = df.loc[1:]
df=df.astype(float)
ax = df.plot(x='Speed')
Error:
could not convert string to float: '-72,556'
Desired Output:
Speed A
0 700.0 -72.556
1 800.0 -58.9103
2 900.0 -73.1678
3 1000.0 -78.2272