For a current project, I am planning to clean a Pandas DataFrame off its Null values. For this purpose, I want to use Pandas.DataFrame.fillna, which is apparently a solid soliton for data cleanups.
When running the below code, I am however receiving the following error AttributeError: module 'pandas' has no attribute 'df'. I tried several options to rewrite the line df = pd.df().fillna, none of which changed the outcome.
Is there any smart tweak to get this running?
import string
import json
import pandas as pd
# Loading and normalising the input file
file = open("sp500.json", "r")
data = json.load(file)
df = pd.json_normalize(data)
df = pd.df().fillna