python 3.x – Comments on the object-oriented ETL class structure for processing summary earnings data

How can we improve the structure of the class below?

I use Python3 and Pandas 0.24.2 to perform data processing and ETL workflows. I've followed this trend many times and it bothers me a lot, but I'm not sure which way to go to improve it. Any advice on what to do differently is greatly appreciated. This is an example of a toy, but the logic is the same. The main method is below.

import pandas as pd
import deque collections
since import defaultdict collections
from collections import namedtuple
since src.query_helper import postgres_query_helper as pgqh

ComputeNetProfitSummary class ():
def __init __ (self, date = None, id_usine = None):
self.date = date
self.factory_id = id_usine
self.pg_query_helper = pgqh.PostgresQueryHelper ()

def build_sql_query (auto):
sql_query = f "" "Select * FROM factory_table
WHERE date = {self.date} & # 39;
AND factory_id = {self.factory_id}
"" "
returns sql_query

def create_orders_df (auto):
"" "Create Data Frame Commands" ""
if self.date and self.factory_id:
sql_query = self.build_sql_query ()
df = self.pg_query_helper.execute_sql_return_df (sql_query)
return df

def compute_complex_metrics_on_df (auto):
"" "A complicated logic using the FIFO allocation" ""
ComplexData = namedtuple (& # 39; ComplexData & # 39 ;, ['ColumnNamesA', ..., 'ColumnNamesZ'])
all_data = []  

        for the line in self.orders_df.iterrows ():
"" "Do complicated things" ""
transform_row = # some calculations on the line
complex_output = ComplexData (transformation_row)
all_data.append (complex_output)

complex_df = pd.DataFrame (all_data)
return complex_df

def compute_summary_statistics (auto):
"" "Calculate summary data" ""
summary_data = defaultdict (dict)
# Create summary data, it suits me
return summary_data

def compute_summary_data (auto):
self.orders_df = self.create_orders_df ()
self.complex_df = compute_complex_metrics_on_df ()
self.summary_statistics = compute_summary_statistics ()

if __name__ == __ hand __:
cnp = ComputeNetProfitSummary (date = 2019-01-01, id_usine = A)

summary_data = cnp.compute_summary_data ()

for the key, value in summary_data.items ():
print (key)
print (value)

NOTE: I'm one of the only Python developers on my team, so I do not do it.
have a lot of comments on this type of code very often. Any comment or
constructive criticism is welcome, design models at PEP8.