-
Notifications
You must be signed in to change notification settings - Fork 2
Make method to convert a GIG table into a Pandas dataframe #34
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 ag 8000 ree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yes, we could reasonably use pandas for the moment, as long as we don't end up relying on pandas functions in the scripts we write. |
A conversion to a pandas dataframe is quite reasonable anyway. FWIW in tsdate, to avoid a pandas dependency we just have an |
I'm inclined to go for the latter for now, since I don't have any use for the dict object outside of turning it into a dataframe. I'm only going to use Pandas in exploratory work, so it won't be any trouble to drop the Pandas dependency later, I think? |
Sure. Maybe call it |
While we have a GIG data model, we still lack basic methods to do things like subsetting (e.g.
intervals[intervals.parent == 2]
) and sorting by a particular column. If we convert a GIG table to a Pandas DataFrame, doing such basic data manipulation is trivial, so I think having such a conversion method available will be useful for exploratory work. It will be hard to do subsetting and sorting more efficiently than Pandas without resorting to the tricks used in tskit, so I'm inclined to kick that down the road for now.The text was updated successfully, but these errors were encountered: