I do have a class:
class BaseModel:
def __init__(self):
pass
def read_data(self):
df = ...
return df
def transform_input(self, df):
df = ...
return df
def execute(self, df):
df = ...
return df
def run(self):
data = self.read_data()
data = self.transform_input(data)
data = self.execute(data)
How to avoid these methods call one after the other? is it possible to do sth like:
data = self.read_data().transform_input().execute()
?
Is it possible to chain somehow these methods and solve the issue of passing the argument (data) withing this methods chain?