The first thing to recognize is the columns that have 'x' in them are not integer datatypes. They are object datatypes.
df = pd.read_csv('file.csv')
df
Col1 Col2
0 1 22
1 2 44
2 3 x
3 4 88
4 5 110
5 6 132
6 7 x
7 8 176
8 9 198
9 10 x
df.dtypes
Col1 int64
Col2 object
dtype: object
In order to get the mean of Col2, it needs to be converted to a numeric value.
df['Col2'] = pd.to_numeric(df['Col2'], errors='coerce').astype('Int64')
df.dtypes
Col1 int64
Col2 Int64
dtype: object
The df now looks like so:
df
Col1 Col2
0 1 22
1 2 44
2 3 <NA>
3 4 88
4 5 110
5 6 132
6 7 <NA>
7 8 176
8 9 198
9 10 <NA>
Now we can use fillna() with df['Col2'].mean():
df['Col2'] = df['Col2'].fillna(df['Col2'].mean())
df
Col1 Col2
0 1 22
1 2 44
2 3 110
3 4 88
4 5 110
5 6 132
6 7 110
7 8 176
8 9 198
9 10 110