-
Notifications
You must be signed in to change notification settings - Fork 4
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
Inefficient use of memory in code: dataframe copies #19
Comments
Proposed change could be:
|
2nd case:
Can [***] not be made more efficient ? Proposed code change
|
Python does not create entire copies of the data frame in memory. Instead it creates a view in the variable d, and passes by reference here:
The only inefficiency here is that we are creating a new DataFrame
More efficient implementation
|
visualization/main.py,
line 189-208:[*] line 189: This appears to make a copy of the entire data frame in memory in the variable d.
Can this simply be resolved by copying the RHS of
d=
and using that in the lines below?[**] line 197: this appears to create another data frame
filtered
that is used in the lines below just once, in line 202.[***] Here df is deleted, which was the filtered data frame that was copied into df_main. Isn't this inefficient copying of data?
The text was updated successfully, but these errors were encountered: