-1
Hello
I have this Dataframe, generated from a file (.txt):
NUMERO_PROCESSO ANO_PROCESSO TRIBUNAL
0 0010402 2018 18
1 0010758 2014 01
2 0001622 2012 08
3 0020287 2019 04
4 1001446 2018 02
5 0000795 2019 07
6 1001620 2017 02
7 0001006 2019 11
8 0100584 2017 01
9 0010339 2016 18
The column 'ANO_PROCESSO' is string, as I transform the column of the Dataframe into INT, or as I resolve the issue below without the mentioned errors (generate a Dataframe with lines whose ANO_PROCESSO is greater or equal to 2018):
df_remove = df_contas_validas.loc[(int(df_contas_validas['ANO_PROCESSO']) >= 2018)]
error: cannot Convert the series to
df_remove = df_contas_validas.loc[(df_contas_validas['ANO_PROCESSO'] >= 2018)]
error: '>=' not supported between instances of 'str' and 'int'