change param to customer ID
This commit is contained in:
parent
c70bd1cdc6
commit
b229794e6d
@ -34,7 +34,7 @@ if TYPE_CHECKING:
|
||||
|
||||
def sales_per_customer(
|
||||
df: pd.DataFrame,
|
||||
kunde: int,
|
||||
customer_id: int,
|
||||
min_num_data_points: int = 100,
|
||||
) -> FcResult:
|
||||
"""_summary_
|
||||
@ -59,7 +59,9 @@ def sales_per_customer(
|
||||
# TODO change away from nested DataFrames: just use "f_umsatz_fakt"
|
||||
# TODO with strong type checks
|
||||
df = df.copy()
|
||||
df_firma = df[(df["firma_refid"] == kunde) & (df["beleg_typ"] == 1) & (df["betrag"] > 0)]
|
||||
df_firma = df[
|
||||
(df["firma_refid"] == customer_id) & (df["beleg_typ"] == 1) & (df["betrag"] > 0)
|
||||
]
|
||||
|
||||
for transaction in df_firma["vorgang_refid"].unique():
|
||||
cust_data.order.append(transaction)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user