Reputation: 937
How can I check the names of available dataframes in pandas?
with a loop I create several dataframes and I would like to check if all the desidered df are created
Upvotes: 1
Views: 64
Reputation: 13372
Assuming you have DataFrame
imported, you can simply do
[name for name, obj in locals().items() if isinstance(obj, DataFrame)]
Upvotes: 3