Hello,
could someone help me please with a special programming question:
I have a dataframe like this:
Datum Mitarbeiter Tageszeit
0 01.01.2023 M51 V
10 01.01.2023 M51 N
37 02.01.2023 M53 V
91 02.01.2023 M51 V
506 02.01.2023 M53 N
... ... ... ...
323288 04.12.2024 M53 N
323608 05.12.2024 M53 V
324199 05.12.2024 M34 N
324210 05.12.2024 M53 N
324419 06.12.2024 M53 V
I would need to calculate a table like this
Datum Tageszeit M51 M53 M34
04.12.2024 V 0 0 0
04.12.2024 N 0 X 0
Where X is set if there is an entry in the original table at e.g. Datum 04.12.2024 Tageszeit V for Mitarbeiter M51 or Mitarbeiter M34 and a 0 if there is not.
V means noon, N means afternoon.
How can I achieve this. I was thinking for a pivot table, but I have no idea how to do this.
Regards,
Gunthert
could someone help me please with a special programming question:
I have a dataframe like this:
Datum Mitarbeiter Tageszeit
0 01.01.2023 M51 V
10 01.01.2023 M51 N
37 02.01.2023 M53 V
91 02.01.2023 M51 V
506 02.01.2023 M53 N
... ... ... ...
323288 04.12.2024 M53 N
323608 05.12.2024 M53 V
324199 05.12.2024 M34 N
324210 05.12.2024 M53 N
324419 06.12.2024 M53 V
I would need to calculate a table like this
Datum Tageszeit M51 M53 M34
04.12.2024 V 0 0 0
04.12.2024 N 0 X 0
Where X is set if there is an entry in the original table at e.g. Datum 04.12.2024 Tageszeit V for Mitarbeiter M51 or Mitarbeiter M34 and a 0 if there is not.
V means noon, N means afternoon.
How can I achieve this. I was thinking for a pivot table, but I have no idea how to do this.
Regards,
Gunthert