Posts by vitorys • 16 points
4 posts
-
0
votes1
answer24
viewsA: Empty table ("Empty Dataframe") and ambiguity of comparison in Pandas
You can search for entries in the Dataframe as follows: df_with_filter = df[ df['coluna'] == 'condicao' ] In the matter of checking two values of the same line that satisfy a condition, you need to…
-
0
votes2
answers85
viewsA: sklearn library accuracy_score error
In machine learning algorithms there are the input data, which are usually stored in the variable X, as X_train and X_test and variables storing the labels referring to the input data, usually…
-
0
votes2
answers415
viewsA: Rename a graph label in Python Matplotlib
You can use the following code: porcentagemSexo = sexo.value_counts(normalize=True) rotulo = ['Feminino', 'Masculino'] plt.pie(porcentagemSexo, labels = rotulo, autopct='%1.1f%%')…
-
0
votes2
answers62
viewsA: for function in Python3 - how to print all elements of a series
What you’re doing with this code is actually iterating the elements within the variable test['text'][i]. Maybe you’re actually trying to iterate on the element test['text']. Execute the following…