TypeError: cannot convert the series to <class 'int'>

i am getting the TypeError: cannot convert the series to <class 'int> and I do not know why.
it is regarding the test_data_cleaning case

# Import data (Make sure to parse dates. Consider setting index column to 'date'.)
df = pd.read_csv("fcc-forum-pageviews.csv", parse_dates=True)
df = df.set_index('date')

# Clean data

df = df[(df['value'] >= (df['value'].quantile(0.025))) &(df['value'] <= (df['value'].quantile(0.975)))]

I saw that each graph needs a copy - which I did , but what I don’t get is why this error comes up during cleaning.
I tried

  • changing format to float and int32,
  • dropping index column
  • resetting index column then dropping

This is the error:

ERROR: test_data_cleaning (test_module.DataCleaningTestCase)
Traceback (most recent call last):
  File "/home/runner/boilerplate-page-view-time-series-visualizer-2/test_module.py", line 7, in test_data_cleaning
    actual = int(time_series_visualizer.df.count(numeric_only=True))
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pandas/core/series.py", line 139, in wrapper
    raise TypeError(f"cannot convert the series to {converter}")
TypeError: cannot convert the series to <class 'int'>

I looked at; Page View Time Series Visualizer and Page View Time Series Visualizer test error but found no solution. this last one has actual = int(time_series_visualizer.df.count(numeric_only=True)) so that shouldn’t be the problem.
Has anyone else faced this issue?

These lines looks okay. Most likely some other place is causing the issue. Can you show the rest of the code, ideally on repl.it as that would helping make easier?