rename data parameter in forecast
This commit is contained in:
parent
b229794e6d
commit
8fa429d477
@ -33,7 +33,7 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
|
|
||||||
def sales_per_customer(
|
def sales_per_customer(
|
||||||
df: pd.DataFrame,
|
data: pd.DataFrame,
|
||||||
customer_id: int,
|
customer_id: int,
|
||||||
min_num_data_points: int = 100,
|
min_num_data_points: int = 100,
|
||||||
) -> FcResult:
|
) -> FcResult:
|
||||||
@ -53,14 +53,13 @@ def sales_per_customer(
|
|||||||
FcResult
|
FcResult
|
||||||
_description_
|
_description_
|
||||||
"""
|
"""
|
||||||
|
|
||||||
cust_data: CustomerDataSalesForecast = CustomerDataSalesForecast()
|
cust_data: CustomerDataSalesForecast = CustomerDataSalesForecast()
|
||||||
# filter data
|
# filter data
|
||||||
# TODO change away from nested DataFrames: just use "f_umsatz_fakt"
|
# TODO change away from nested DataFrames: just use "f_umsatz_fakt"
|
||||||
# TODO with strong type checks
|
# TODO with strong type checks
|
||||||
df = df.copy()
|
data = data.copy()
|
||||||
df_firma = df[
|
df_firma = data[
|
||||||
(df["firma_refid"] == customer_id) & (df["beleg_typ"] == 1) & (df["betrag"] > 0)
|
(data["firma_refid"] == customer_id) & (data["beleg_typ"] == 1) & (data["betrag"] > 0)
|
||||||
]
|
]
|
||||||
|
|
||||||
for transaction in df_firma["vorgang_refid"].unique():
|
for transaction in df_firma["vorgang_refid"].unique():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user