Chciałbym sprawdzić, czy konkretny ciąg istnieje w określonej kolumnie w mojej ramce danych.Sprawdź, czy ciąg jest w ramce danych pandy
Dostaję błąd
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
import pandas as pd
BabyDataSet = [('Bob', 968), ('Jessica', 155), ('Mary', 77), ('John', 578), ('Mel', 973)]
a = pd.DataFrame(data=BabyDataSet, columns=['Names', 'Births'])
if a['Names'].str.contains('Mel'):
print "Mel is there"
Kto jesteś ty, @JohnGalt? –