|
|
@@ -37,6 +37,7 @@ BASE_COLUMNS: Dict[str, Sequence[str]] = {
|
|
|
"广告age",
|
|
|
"日均首层UV",
|
|
|
"首层效率收入",
|
|
|
+ "T0裂变效率收入",
|
|
|
"LTV预测效率收入",
|
|
|
"日均成本",
|
|
|
DISPLAY_MULTIPLIER_COLUMN,
|
|
|
@@ -50,6 +51,7 @@ BASE_COLUMNS: Dict[str, Sequence[str]] = {
|
|
|
"公众号名",
|
|
|
"日均首层UV",
|
|
|
"首层效率收入",
|
|
|
+ "T0裂变效率收入",
|
|
|
"LTV预测效率收入",
|
|
|
"日均成本",
|
|
|
DISPLAY_MULTIPLIER_COLUMN,
|
|
|
@@ -62,6 +64,7 @@ BASE_COLUMNS: Dict[str, Sequence[str]] = {
|
|
|
"合作方名",
|
|
|
"日均首层UV",
|
|
|
"首层效率收入",
|
|
|
+ "T0裂变效率收入",
|
|
|
"LTV预测效率收入",
|
|
|
"日均成本",
|
|
|
DISPLAY_MULTIPLIER_COLUMN,
|
|
|
@@ -107,6 +110,10 @@ def _sheet_frame(candidates: pd.DataFrame, sheet_name: str) -> pd.DataFrame:
|
|
|
pd.to_numeric(subset.get("效率收入"), errors="coerce")
|
|
|
/ coverage_days
|
|
|
)
|
|
|
+ subset["T0裂变效率收入"] = (
|
|
|
+ pd.to_numeric(subset.get("T0实际裂变收入"), errors="coerce")
|
|
|
+ / coverage_days
|
|
|
+ )
|
|
|
subset["LTV预测效率收入"] = (
|
|
|
pd.to_numeric(
|
|
|
subset.get("预测全链路效率收入"), errors="coerce"
|
|
|
@@ -129,7 +136,7 @@ def _sheet_frame(candidates: pd.DataFrame, sheet_name: str) -> pd.DataFrame:
|
|
|
ordered = visible_columns + hidden_columns
|
|
|
subset = subset[ordered]
|
|
|
if not subset.empty:
|
|
|
- subset = subset.sort_values("预测ROI", ascending=False)
|
|
|
+ subset = subset.sort_values("预测ROI", ascending=True)
|
|
|
return subset
|
|
|
|
|
|
|
|
|
@@ -169,6 +176,7 @@ def _format_sheet(ws, sheet_name: str) -> None:
|
|
|
ws.cell(row, column_index).number_format = "0.000"
|
|
|
elif "成本" in str(header) or header in {
|
|
|
"首层效率收入",
|
|
|
+ "T0裂变效率收入",
|
|
|
"LTV预测效率收入",
|
|
|
"效率收入",
|
|
|
"T0实际裂变收入",
|