Quellcode durchsuchen

change output of db analyser a little bit

Bernadette Elena Hammerle vor 3 Jahren
Ursprung
Commit
7af6bcfec2
1 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen
  1. 4 2
      src/database/dbAnalyser.py

+ 4 - 2
src/database/dbAnalyser.py

@@ -95,8 +95,8 @@ def smallValues(df):
 
 
 def avgPerMarkerNo(df, markerNo):
-    print(f"\naverage time for {markerNo} markers")
-    print("number of measurements")
+    print(f"\nresult of {markerNo} markers\n")
+    print("number of measurements:")
     df = df.loc[df["markers"] == markerNo]
     resDf = pd.DataFrame(columns=["id", "timeMean", "rating"])
     for mapId, mapDf in df.groupby(["id"]):
@@ -109,7 +109,9 @@ def avgPerMarkerNo(df, markerNo):
                 resDf = resDf.append({"id": "mapbox_" + markerType, "timeMean": typeDf["time"].mean()}, ignore_index=True)
 
     resDf = resDf.assign(rating=lambda x: (round(4-((4-0)/(max(resDf["timeMean"])-min(resDf["timeMean"]))*(x["timeMean"]-max(resDf["timeMean"]))+4))))
+    print("\naverage time:")
     print(resDf)
+    print("--------------------------------------")
 
 
 def timeMapsHighlight(df, plotTitle="mapsHightlight.png"):