consider my Dataframe
calories duration
0 420 50.55
1 380 40.48
2 390 food
I need to ensure that the duration doesn't contain character i tried
if df["duration"].isdigit():
print("True")
else:
print('The input is not a valid number')
but it gives error:
'Series' object has no attribute 'isdigit'