Last active
April 13, 2022 00:44
-
-
Save regispires/db097b95d8b131d0c20a5e029a6356dc to your computer and use it in GitHub Desktop.
Load firestore firebase table to pandas dataframe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from google.cloud import firestore | |
import pandas as pd | |
os.environ["GOOGLE_APPLICATION_CREDENTIALS"]="myapp-firebase-adminsdk.json" | |
db = firestore.Client() | |
users = list(db.collection('usuarios').stream()) | |
users_dict = list(map(lambda x: x.to_dict(), users)) | |
df = pd.DataFrame(users_dict) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See: https://gist.github.com/romicofre/ee80100b62b5fdbed42218e8239df94e