You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
En travaillant sur les dataframes transposées (#54) , en expérimentant avec unstructured, on a un index numéroté qui apparaît.
Cet index numéroté est embêtant parce qu'en transposant la dataframe, les noms de colonnes deviennent ces numéros.
Par exemple, sur Enel 2020 , on a un tableau :
,Unnamed: 0,UM,Italy,Spain,Russia,Romania,Unnamed: 6,Netherlands,2020,2019,2020-2019,Unnamed: 11,%,Unnamed: 13,Unnamed: 14
0,Taxes Borne (cash accounting),,17424,10599,287,,295,444,29050,29392,342,342,-12%,,
1,Profit taxes Income tax,€/mil,10254,1122,132,211,,434,9909,10676,768,768,-72%,,
2,Profit taxes Income tax,,€/mil,10254,1362,132,211,,434,9669,10369,,700,-67%,
3,Property taxes,€/mil,1299,697,56,41,,,2094,2040,,54,26%,,
et en transposant :
0 1 2 ... 27 28 29
Unnamed: 0 Taxes Borne (cash accounting) Profit taxes Income tax Profit taxes Income tax ... Ratio TTC to turnover Taxes Borne in relation to revenues Taxes Collected in relation to revenues
UM NaN €/mil NaN ... % fo} % fo} % fo}
Italy 17424 10254 €/mil ... 216% 41% 175%
Spain 10599 1122 10254 ... 166% 63% 103%
Et il suffit de faire :
df = df.set_index(df.columns[0])
et hop , on peut transposer :
UM Italy Spain Russia Romania Unnamed: 6 Netherlands 2020 2019 2020-2019 Unnamed: 11 % Unnamed: 13 Unnamed: 14
Unnamed: 0
Taxes Borne (cash accounting) NaN 17424 10599 287 NaN 295 444 29050 29392 342 342 -12% NaN NaN
Profit taxes Income tax €/mil 10254 1122 132 211 NaN 434 9909 10676 768 768 -72% NaN NaN
Profit taxes Income tax NaN €/mil 10254 1362 132 211 NaN 434 9669 10369 NaN 700 -67% NaN
en
Unnamed: 0 Taxes Borne (cash accounting) Profit taxes Income tax Profit taxes Income tax ... Ratio TTC to turnover Taxes Borne in relation to revenues Taxes Collected in relation to revenues
UM NaN €/mil NaN ... % fo} % fo} % fo}
Italy 17424 10254 €/mil ... 216% 41% 175%
Spain 10599 1122 10254 ... 166% 63% 103%
La question est de savoir si ce changement df.set_index(df.columns[0]) peut appliquer tout le temps, quel que soit l'algorithme ?
The text was updated successfully, but these errors were encountered:
En travaillant sur les dataframes transposées (#54) , en expérimentant avec
unstructured
, on a un index numéroté qui apparaît.Cet index numéroté est embêtant parce qu'en transposant la dataframe, les noms de colonnes deviennent ces numéros.
Par exemple, sur Enel 2020 , on a un tableau :
et en transposant :
Et il suffit de faire :
et hop , on peut transposer :
en
La question est de savoir si ce changement
df.set_index(df.columns[0])
peut appliquer tout le temps, quel que soit l'algorithme ?The text was updated successfully, but these errors were encountered: