3
Hello!
I have two pandas dataframes and selected a column of each with ids. I want to compare the ids to see if the id of one dataframe is contained in another, but it does not have the same amount of lines and is not in the same order.
I tried to compare it this way
#Read data
import pandas as pd
cursos = pd.read_excel("planilha1.xlsx")
unidade_ensino = pd.read_excel("planilha2.xlsx", na_values=str)
cursos = cursos.loc(cursos['codigo_unidade_ensino'] == unidade_ensino['cod_unidade_ensino'])
However, I received the following error:
Valueerror: Can only compare identically-labeled Series Objects