I would like to money patch a function without the requirement to initialize using pd.DataFrame.function = function
For example, if I have a dataframe df and I call df.unique() I do not have to run pd.DataFrame.unique = unique prior to running as this appears to be built in. Is there a way I can do the same for my own functions without the need to initialise every time?

monkey patch without the need to intitalise
Patching an existing class, e.g. pd.DataFrame, so that all instances have a patched method is not trivial, IMO.
What about simply subclassing pd.DataFrame?
import pandas as pd


class MyDataFrame(pd.DataFrame):
    def my_func(self):
        print("yey")

df = MyDataFrame()
df.my_func()

# Outputs:
# yey

