[๐ BUG] Error when aggregating a table with a date column
What went wrong? ๐ค
Aggregation in a Taipy table raises an error when there is a date column inside the table.
This worked in 3.1 but not anymore in 4.0.
Nothing shown on the Python console.
Client console:
taipy-gui-deps.dll.js?09280cf3a6e7afe74927:184 TypeError: Cannot read properties of undefined (reading 'dfid')
at taipy-gui.js?09280cf3a6e7afe74927:184:117165
at Array.reduce (<anonymous>)
at xV (taipy-gui.js?09280cf3a6e7afe74927:184:117132)
at taipy-gui.js?09280cf3a6e7afe74927:184:172564
at hl (taipy-gui-deps.dll.js?09280cf3a6e7afe74927:184:554395)
at jr (taipy-gui-deps.dll.js?09280cf3a6e7afe74927:184:574340)
at taipy-gui-deps.dll.js?09280cf3a6e7afe74927:184:573117
at Ar (taipy-gui-deps.dll.js?09280cf3a6e7afe74927:184:573177)
at lr (taipy-gui-deps.dll.js?09280cf3a6e7afe74927:184:566993)
at Na (taipy-gui-deps.dll.js?09280cf3a6e7afe74927:184:508021)
Expected Behavior
We should be able to aggregate the table even if there is a date column inside the table.
Steps to Reproduce Issue
Run this code and aggregate on Country in the table:
from taipy.gui import Gui
import taipy.gui.builder as tgb
import pandas as pd
data = pd.DataFrame(
{
"Country": ["France", "France", "UK", "UK"],
"Date": ["2020-01-01", "2020-01-02", "2020-01-03", "2020-01-04"],
}
)
data["Date"] = pd.to_datetime(data["Date"])
with tgb.Page() as page:
tgb.table(
"{data}",
group_by__Country=True,
)
if __name__ == "__main__":
Gui(page=page).run(title="Date Aggregation")
Version of Taipy
4.0
Acceptance Criteria
- [ ] Ensure new code is unit tested, and check code coverage is at least 90%.
- [ ] Create related issue in taipy-doc for documentation and Release Notes.
Code of Conduct
- [X] I have checked the existing issues.
- [ ] I am willing to work on this issue (optional)
Hi @FlorianJacta I'm interested to contribute to this issue ? Could you please assign me ?
This is not yet open for contribution. You can look into our other issues for the moment. We will let you know when this issue is open for contribution!
Fixed in 4.0.1.dev1 :tada: