Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace uses of DataFrame with MetricflowDataTable #1235

Merged
merged 15 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
| metric_time__day | listing__capacity_latest | bookings | instant_bookings |
|:--------------------|---------------------------:|-----------:|-------------------:|
| 2019-12-01 00:00:00 | 5 | 1 | 0 |
| 2019-12-18 00:00:00 | 4 | 4 | 2 |
| 2019-12-19 00:00:00 | 4 | 6 | 6 |
| 2019-12-19 00:00:00 | 5 | 2 | 0 |
| 2019-12-20 00:00:00 | 5 | 2 | 0 |
| 2020-01-01 00:00:00 | 4 | 2 | 1 |
| 2020-01-02 00:00:00 | 4 | 3 | 3 |
| 2020-01-02 00:00:00 | 5 | 1 | 0 |
| 2020-01-03 00:00:00 | 5 | 1 | 0 |
metric_time__day listing__capacity_latest bookings instant_bookings
------------------ -------------------------- ---------- ------------------
2019-12-01 5 1 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh interesting. Is that because the datetime/dateutil objects don't format in 0 values for time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually due to a case in the text formatting logic. In retrospect, let me remove that.

2019-12-18 4 4 2
2019-12-19 4 6 6
2019-12-19 5 2 0
2019-12-20 5 2 0
2020-01-01 4 2 1
2020-01-02 4 3 3
2020-01-02 5 1 0
2020-01-03 5 1 0
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
| metric_time__day | trailing_2_months_revenue |
|:--------------------|----------------------------:|
| 2020-01-01 00:00:00 | 1000 |
metric_time__day trailing_2_months_revenue
------------------ ---------------------------
2020-01-01 1000
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
| metric_time__day | listing__capacity_latest | bookings | instant_bookings |
|:--------------------|---------------------------:|-----------:|-------------------:|
| 2019-12-01 00:00:00 | 5 | 1 | 0 |
| 2019-12-18 00:00:00 | 4 | 4 | 2 |
| 2019-12-19 00:00:00 | 4 | 6 | 6 |
metric_time__day listing__capacity_latest bookings instant_bookings
------------------ -------------------------- ---------- ------------------
2019-12-01 5 1 0
2019-12-18 4 4 2
2019-12-19 4 6 6
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
| metric_time__day | listing__capacity_latest | bookings | instant_bookings |
|:--------------------|---------------------------:|-----------:|-------------------:|
| 2019-12-01 00:00:00 | 5 | 1 | 0 |
| 2019-12-19 00:00:00 | 5 | 2 | 0 |
| 2019-12-20 00:00:00 | 5 | 2 | 0 |
| 2020-01-02 00:00:00 | 5 | 1 | 0 |
| 2020-01-03 00:00:00 | 5 | 1 | 0 |
metric_time__day listing__capacity_latest bookings instant_bookings
------------------ -------------------------- ---------- ------------------
2019-12-01 5 1 0
2019-12-19 5 2 0
2019-12-20 5 2 0
2020-01-02 5 1 0
2020-01-03 5 1 0
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
| metric_time__day | listing__capacity_latest | bookings | instant_bookings |
|:--------------------------|---------------------------:|-----------:|-------------------:|
| 2019-12-01 00:00:00+00:00 | 5 | 1 | 0 |
| 2019-12-18 00:00:00+00:00 | 4 | 4 | 2 |
| 2019-12-19 00:00:00+00:00 | 4 | 6 | 6 |
| 2019-12-19 00:00:00+00:00 | 5 | 2 | 0 |
| 2019-12-20 00:00:00+00:00 | 5 | 2 | 0 |
| 2020-01-01 00:00:00+00:00 | 4 | 2 | 1 |
| 2020-01-02 00:00:00+00:00 | 4 | 3 | 3 |
| 2020-01-02 00:00:00+00:00 | 5 | 1 | 0 |
| 2020-01-03 00:00:00+00:00 | 5 | 1 | 0 |
metric_time__day listing__capacity_latest bookings instant_bookings
------------------ -------------------------- ---------- ------------------
2019-12-01 5 1 0
2019-12-18 4 4 2
2019-12-19 4 6 6
2019-12-19 5 2 0
2019-12-20 5 2 0
2020-01-01 4 2 1
2020-01-02 4 3 3
2020-01-02 5 1 0
2020-01-03 5 1 0
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
| metric_time__day | trailing_2_months_revenue |
|:--------------------------|----------------------------:|
| 2020-01-01 00:00:00+00:00 | 1000 |
metric_time__day trailing_2_months_revenue
------------------ ---------------------------
2020-01-01 1000
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
| metric_time__day | listing__capacity_latest | bookings | instant_bookings |
|:--------------------------|---------------------------:|-----------:|-------------------:|
| 2019-12-01 00:00:00+00:00 | 5 | 1 | 0 |
| 2019-12-18 00:00:00+00:00 | 4 | 4 | 2 |
| 2019-12-19 00:00:00+00:00 | 4 | 6 | 6 |
metric_time__day listing__capacity_latest bookings instant_bookings
------------------ -------------------------- ---------- ------------------
2019-12-01 5 1 0
2019-12-18 4 4 2
2019-12-19 4 6 6
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
| metric_time__day | listing__capacity_latest | bookings | instant_bookings |
|:--------------------------|---------------------------:|-----------:|-------------------:|
| 2019-12-01 00:00:00+00:00 | 5 | 1 | 0 |
| 2019-12-19 00:00:00+00:00 | 5 | 2 | 0 |
| 2019-12-20 00:00:00+00:00 | 5 | 2 | 0 |
| 2020-01-02 00:00:00+00:00 | 5 | 1 | 0 |
| 2020-01-03 00:00:00+00:00 | 5 | 1 | 0 |
metric_time__day listing__capacity_latest bookings instant_bookings
------------------ -------------------------- ---------- ------------------
2019-12-01 5 1 0
2019-12-19 5 2 0
2019-12-20 5 2 0
2020-01-02 5 1 0
2020-01-03 5 1 0
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
| metric_time__day | listing__capacity_latest | bookings | instant_bookings |
|:-------------------|---------------------------:|-----------:|-------------------:|
| 2019-12-01 | 5 | 1 | 0 |
| 2019-12-18 | 4 | 4 | 2 |
| 2019-12-19 | 4 | 6 | 6 |
| 2019-12-19 | 5 | 2 | 0 |
| 2019-12-20 | 5 | 2 | 0 |
| 2020-01-01 | 4 | 2 | 1 |
| 2020-01-02 | 4 | 3 | 3 |
| 2020-01-02 | 5 | 1 | 0 |
| 2020-01-03 | 5 | 1 | 0 |
metric_time__day listing__capacity_latest bookings instant_bookings
------------------ -------------------------- ---------- ------------------
2019-12-01 5 1 0
2019-12-18 4 4 2
2019-12-19 4 6 6
2019-12-19 5 2 0
2019-12-20 5 2 0
2020-01-01 4 2 1
2020-01-02 4 3 3
2020-01-02 5 1 0
2020-01-03 5 1 0
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
| metric_time__day | trailing_2_months_revenue |
|:--------------------|----------------------------:|
| 2020-01-01 00:00:00 | 1000 |
metric_time__day trailing_2_months_revenue
------------------ ---------------------------
2020-01-01 1000
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
| metric_time__day | listing__capacity_latest | bookings | instant_bookings |
|:-------------------|---------------------------:|-----------:|-------------------:|
| 2019-12-01 | 5 | 1 | 0 |
| 2019-12-18 | 4 | 4 | 2 |
| 2019-12-19 | 4 | 6 | 6 |
metric_time__day listing__capacity_latest bookings instant_bookings
------------------ -------------------------- ---------- ------------------
2019-12-01 5 1 0
2019-12-18 4 4 2
2019-12-19 4 6 6
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
| metric_time__day | listing__capacity_latest | bookings | instant_bookings |
|:-------------------|---------------------------:|-----------:|-------------------:|
| 2019-12-01 | 5 | 1 | 0 |
| 2019-12-19 | 5 | 2 | 0 |
| 2019-12-20 | 5 | 2 | 0 |
| 2020-01-02 | 5 | 1 | 0 |
| 2020-01-03 | 5 | 1 | 0 |
metric_time__day listing__capacity_latest bookings instant_bookings
------------------ -------------------------- ---------- ------------------
2019-12-01 5 1 0
2019-12-19 5 2 0
2019-12-20 5 2 0
2020-01-02 5 1 0
2020-01-03 5 1 0
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
| metric_time__day | listing__capacity_latest | bookings | instant_bookings |
|:--------------------|---------------------------:|-----------:|-------------------:|
| 2019-12-01 00:00:00 | 5 | 1 | 0 |
| 2019-12-18 00:00:00 | 4 | 4 | 2 |
| 2019-12-19 00:00:00 | 4 | 6 | 6 |
| 2019-12-19 00:00:00 | 5 | 2 | 0 |
| 2019-12-20 00:00:00 | 5 | 2 | 0 |
| 2020-01-01 00:00:00 | 4 | 2 | 1 |
| 2020-01-02 00:00:00 | 4 | 3 | 3 |
| 2020-01-02 00:00:00 | 5 | 1 | 0 |
| 2020-01-03 00:00:00 | 5 | 1 | 0 |
metric_time__day listing__capacity_latest bookings instant_bookings
------------------ -------------------------- ---------- ------------------
2019-12-01 5 1 0
2019-12-18 4 4 2
2019-12-19 4 6 6
2019-12-19 5 2 0
2019-12-20 5 2 0
2020-01-01 4 2 1
2020-01-02 4 3 3
2020-01-02 5 1 0
2020-01-03 5 1 0
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
| metric_time__day | trailing_2_months_revenue |
|:--------------------|----------------------------:|
| 2020-01-01 00:00:00 | 1000.00 |
metric_time__day trailing_2_months_revenue
------------------ ---------------------------
2020-01-01 1000
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
| metric_time__day | listing__capacity_latest | bookings | instant_bookings |
|:--------------------|---------------------------:|-----------:|-------------------:|
| 2019-12-01 00:00:00 | 5 | 1 | 0 |
| 2019-12-18 00:00:00 | 4 | 4 | 2 |
| 2019-12-19 00:00:00 | 4 | 6 | 6 |
metric_time__day listing__capacity_latest bookings instant_bookings
------------------ -------------------------- ---------- ------------------
2019-12-01 5 1 0
2019-12-18 4 4 2
2019-12-19 4 6 6
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
| metric_time__day | listing__capacity_latest | bookings | instant_bookings |
|:--------------------|---------------------------:|-----------:|-------------------:|
| 2019-12-01 00:00:00 | 5 | 1 | 0 |
| 2019-12-19 00:00:00 | 5 | 2 | 0 |
| 2019-12-20 00:00:00 | 5 | 2 | 0 |
| 2020-01-02 00:00:00 | 5 | 1 | 0 |
| 2020-01-03 00:00:00 | 5 | 1 | 0 |
metric_time__day listing__capacity_latest bookings instant_bookings
------------------ -------------------------- ---------- ------------------
2019-12-01 5 1 0
2019-12-19 5 2 0
2019-12-20 5 2 0
2020-01-02 5 1 0
2020-01-03 5 1 0
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
| metric_time__day | listing__capacity_latest | bookings | instant_bookings |
|:--------------------|---------------------------:|-----------:|-------------------:|
| 2019-12-01 00:00:00 | 5 | 1 | 0 |
| 2019-12-18 00:00:00 | 4 | 4 | 2 |
| 2019-12-19 00:00:00 | 4 | 6 | 6 |
| 2019-12-19 00:00:00 | 5 | 2 | 0 |
| 2019-12-20 00:00:00 | 5 | 2 | 0 |
| 2020-01-01 00:00:00 | 4 | 2 | 1 |
| 2020-01-02 00:00:00 | 4 | 3 | 3 |
| 2020-01-02 00:00:00 | 5 | 1 | 0 |
| 2020-01-03 00:00:00 | 5 | 1 | 0 |
metric_time__day listing__capacity_latest bookings instant_bookings
------------------ -------------------------- ---------- ------------------
2019-12-01 5 1 0
2019-12-18 4 4 2
2019-12-19 4 6 6
2019-12-19 5 2 0
2019-12-20 5 2 0
2020-01-01 4 2 1
2020-01-02 4 3 3
2020-01-02 5 1 0
2020-01-03 5 1 0
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
| metric_time__day | trailing_2_months_revenue |
|:--------------------|----------------------------:|
| 2020-01-01 00:00:00 | 1000 |
metric_time__day trailing_2_months_revenue
------------------ ---------------------------
2020-01-01 1000
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
| metric_time__day | listing__capacity_latest | bookings | instant_bookings |
|:--------------------|---------------------------:|-----------:|-------------------:|
| 2019-12-01 00:00:00 | 5 | 1 | 0 |
| 2019-12-18 00:00:00 | 4 | 4 | 2 |
| 2019-12-19 00:00:00 | 4 | 6 | 6 |
metric_time__day listing__capacity_latest bookings instant_bookings
------------------ -------------------------- ---------- ------------------
2019-12-01 5 1 0
2019-12-18 4 4 2
2019-12-19 4 6 6
Loading