Re:Django 2.2
by fredley on Monday April 01, 2019 @02:16PM
(#19546351)
.all() doesn't actually do anything, and could be omitted. The beauty of this setup is if you need to rewrite the implementation of .to_dataframe() to optimize it, you can (e.g. to remove the .values() you're worries about and use your above code)
this approach avoids the full data copy calling '.all()' materializes.