|
@@ -1,46 +1,19 @@
|
|
|
+from plan_values2 import VALUES2_HEADER
|
|
|
+
|
|
|
import pandas as pd
|
|
|
import numpy as np
|
|
|
|
|
|
+
|
|
|
base_dir = "/home/robert/projekte/planner/export"
|
|
|
|
|
|
id_header = ["Ebene" + str(i) for i in range(1, 11)]
|
|
|
-# values2_header = ['VJ', 'AJ', 'FC', 'Plan_ori', 'Plan_Prozent', 'Stk', 'VAK', 'BE_Prozent', 'Plan_VJ', 'Plan_Stk_VJ', 'Plan',
|
|
|
-# 'Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez', 'Periode13']
|
|
|
-values2_header = [
|
|
|
- "Plan",
|
|
|
- "Jan",
|
|
|
- "Feb",
|
|
|
- "Mar",
|
|
|
- "Apr",
|
|
|
- "Mai",
|
|
|
- "Jun",
|
|
|
- "Jul",
|
|
|
- "Aug",
|
|
|
- "Sep",
|
|
|
- "Okt",
|
|
|
- "Nov",
|
|
|
- "Dez",
|
|
|
- "Periode13",
|
|
|
- "Plan_ori",
|
|
|
- "Plan_Prozent",
|
|
|
- "Stk",
|
|
|
- "VAK",
|
|
|
- "BE_Prozent",
|
|
|
- "frei",
|
|
|
- "VJ",
|
|
|
- "VJ_Stk",
|
|
|
- "AJ",
|
|
|
- "AJ_Stk",
|
|
|
- "AJ_Okt",
|
|
|
- "AJ_Okt_Stk",
|
|
|
- "FC",
|
|
|
- "FC_Stk",
|
|
|
- "Plan_VJ",
|
|
|
- "Plan_VJ_Stk",
|
|
|
-]
|
|
|
+# values2_header = ['VJ', 'AJ', 'FC', 'Plan_ori', 'Plan_Prozent', 'Stk', 'VAK', 'BE_Prozent', 'Plan_VJ',
|
|
|
+# 'Plan_Stk_VJ', 'Plan', 'Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt',
|
|
|
+# 'Nov', 'Dez', 'Periode13']
|
|
|
+
|
|
|
season_header = ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"]
|
|
|
info_header = ["text", "costcenter", "department"]
|
|
|
-header = info_header + id_header + values2_header
|
|
|
+header = info_header + id_header + VALUES2_HEADER
|
|
|
season_export_header = info_header + season_header
|
|
|
|
|
|
source_header = ["department", "text", "costcenter", "Ebene1", "Plan", "Periode13"]
|
|
@@ -80,7 +53,7 @@ def data_cleansing(filename):
|
|
|
|
|
|
df["id"] = df["id"].str.split(";")
|
|
|
df = expand(df, id_header, "id")
|
|
|
- df = expand(df, values2_header, "values2")
|
|
|
+ df = expand(df, VALUES2_HEADER, "values2")
|
|
|
return df
|
|
|
|
|
|
|