We found this excellent piece of code by @linar-ether the other day.
We just uploaded this code to a dedicated repository.
We refactored the code base and added two example programs at grafana-pandas-datasource/examples at main · panodata/grafana-pandas-datasource · GitHub. See also Sinewave/Midnights example and Apis mellifera flowering example.