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

Something funky with indexes and DataFrames #31

Closed
CamDavidsonPilon opened this issue Feb 4, 2021 · 3 comments
Closed

Something funky with indexes and DataFrames #31

CamDavidsonPilon opened this issue Feb 4, 2021 · 3 comments

Comments

@CamDavidsonPilon
Copy link

Hi @matthewwardrop!
Something came up in lifelines related to Dataframe indexes and transform. Here's a repo example:

from formulaic import Formula

design_info = Formula("1")

df = pd.DataFrame(np.arange(5), index=[0, 2, 4, 6, 8])

print(design_info.get_model_matrix(df)) # should have nulls in half of it
@matthewwardrop
Copy link
Owner

Thanks for reporting @CamDavidsonPilon . Will take a look at fixing it now!

@matthewwardrop
Copy link
Owner

Whoops. Some series were being generated with the default index (and being conflated with the original index). This was fixed in 6567f44, and shipped as part of version 0.2.2 .

Let me know if anything else crops up!

@CamDavidsonPilon
Copy link
Author

Thanks for the fast response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants