Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

194
Vistas
Comparing strings from two different excel file columns

I am trying to compare two excel files using pandas & numpy - the comparable values are IP Addresses. Both excel files have columns with IP Addresses. How would I go about checking if they match and if they don't add the row to the first excel file/dataframe?

#create dataframes with the excel files
df1 = pd.read_excel(excel1)
df2 = pd.read_csv(excel2)

df1.insert(21, 'In R7', '')

#fill in empty IP values so they can be compared
df2['IP Address']=df2['IP Address'].fillna('0')

#if IP in df1 is equal to IP in df2, add yes in R7 column, if it's not already existing add to df1 and yes in R7 column
df1['In R7'] = np.where(df1['Primary IP Address'].str.contains('|'.join(df2['IP Address']), flags= re.IGNORECASE, regex = True), 'YES', '')
about 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda