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

Initialise population dataframe with dict comprehension #1186

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

matt-graham
Copy link
Collaborator

@matt-graham matt-graham commented Nov 13, 2023

Fixes #1174. Avoids series of PerformanceWarning instances on simulation start due to repeated column insertion by initialising all columns together in a dict comprehension and passing to pandas.Dataframe as data argument.

Avoids `PerformanceWarning` due to repeated column insertion
@matt-graham matt-graham requested a review from tamuri November 13, 2023 09:09
@matt-graham matt-graham merged commit dc7f521 into master Nov 13, 2023
55 checks passed
@matt-graham matt-graham deleted the mmg/population-creation-performance-warning branch November 13, 2023 22:14
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

Successfully merging this pull request may close these issues.

PerformanceWarning instances raised on population dataframe creation
2 participants