May-28-2020, 05:36 PM
Dear all.
I have the following dataset:
0 27.05.2020 19,93 19,80 19,93 19,15 74,31M 1,32%
1 26.05.2020 19,67 19,98 20,09 19,33 68,29M 0,98%
2 25.05.2020 19,48 19,48 19,56 19,26 37,58M 4,34%
3 22.05.2020 18,67 18,80 18,90 18,35 68,84M -2,71%
4 21.05.2020 19,19 19,50 19,77 19,07 80,92M -0,57%
5 20.05.2020 19,30 19,09 19,44 19,06 74,12M 3,32%
with following datatype:
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 Data 21 non-null object
1 Ăšltimo 21 non-null object
2 Abertura 21 non-null object
3 Alta 21 non-null object
4 Baixa 21 non-null object
5 Vol. 21 non-null object
6 Var. % 21 non-null object
I am trying to convert column Alta to float without any sucess.
dataset['Alta'] = dataset['Alta'].astype(float)
and errer is :
ValueError: could not convert string to float: '19,93'
CAn you help me please?
I have the following dataset:
0 27.05.2020 19,93 19,80 19,93 19,15 74,31M 1,32%
1 26.05.2020 19,67 19,98 20,09 19,33 68,29M 0,98%
2 25.05.2020 19,48 19,48 19,56 19,26 37,58M 4,34%
3 22.05.2020 18,67 18,80 18,90 18,35 68,84M -2,71%
4 21.05.2020 19,19 19,50 19,77 19,07 80,92M -0,57%
5 20.05.2020 19,30 19,09 19,44 19,06 74,12M 3,32%
with following datatype:
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 Data 21 non-null object
1 Ăšltimo 21 non-null object
2 Abertura 21 non-null object
3 Alta 21 non-null object
4 Baixa 21 non-null object
5 Vol. 21 non-null object
6 Var. % 21 non-null object
I am trying to convert column Alta to float without any sucess.
dataset['Alta'] = dataset['Alta'].astype(float)
and errer is :
ValueError: could not convert string to float: '19,93'
CAn you help me please?