How to do statistical analysis on DataStores?

Is there a way that I could run some code in Roblox Studio to see what the mean, median, mode, range, etc. for some data store keys I have for some stats are?

I am curious to see what the average/median kills and rebirths are in my game

tbh I think doing that in game would be cumbersome and difficult to do. Probably the best way to do this would be to run a script in Studio to connect to the datastore and do a slow export of the contents of to google sheets or similar. That way you can analyse the data off-platform and have a historical snapshot of it for the future.