Skip to content

Instantly share code, notes, and snippets.

@romicofre
Created June 28, 2020 01:03
Show Gist options
  • Save romicofre/ee80100b62b5fdbed42218e8239df94e to your computer and use it in GitHub Desktop.
Save romicofre/ee80100b62b5fdbed42218e8239df94e to your computer and use it in GitHub Desktop.
Load firestore table to pandas dataframe
import pandas as pd
from google.cloud import firestore
db = firestore.Client()
users = list(db.collection(u'users').stream())
users_dict = list(map(lambda x: x.to_dict(), users))
df = pd.DataFrame(users_dict)
@jaredfiacco2
Copy link

Thank you!

@dmi3coder
Copy link

Exactly what I was looking for, thank you!

@jpetro416
Copy link

jpetro416 commented Jan 24, 2022

Thanks! In my case I needed lowercase .client()

@brianwetzel
Copy link

perfect, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment