I have two dataframes.
One has a range of dates, with every hour of the day assigned to each date
+----------+----+
| date|hour|
+----------+----+
|2020-12-20| 0|
|2020-12-20| 1|
|2020-12-20| 2|
|2020-12-20| 3|
|2020-12-20| 4|
|2020-12-20| 5|
|2020-12-20| 6|
|2020-12-20| 7|
|2020-12-20| 8|
|2020-12-20| 9|
The second one has users with dates and hours, but a user has only a few days and a few hours, not all of them:
+----------------+----------+----+------+
|date | user_id|hour| cnt|
+----------------+----------+----+------+
| 2020-12-20|1234567890| 18| 21|
| 2020-12-20| 123456| 7| 4|
| 2020-12-20| 123456| 11| 1|
| 2020-12-20|1234567890| 14| 19|
I need a dataframe with all dates and all hours assigned to every user. If there's no info for some user at a certain time and/or day, then I still want to show that user id but with cnt = 0. How can I achieve this? With a left join I get nulls.