I want to select a DataFrame column, iterate over it and select only the the numbers, and to replace the numbers that contains letters and other sings with 'Unknow'. I've tried isreal() method but it didn't work. Is there a way to acomplish this task without a function?
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
file = 'C:/Users/Сынкетру/Desktop/attacks.csv'
df = pd.read_csv(file, sep=',', encoding='ISO-8859-1')
df_clean = df.Age.dropna()
number = df.isreal()
number = 'Unknown'