Data Science, Machine Learning, Mongodb, Python.
mongo_docs: for key, val in doc.items(): try: fields[Key] = np.append(fields[key], val) except KeyError: fields[key] = np.array([val]) print(fields) series_list = [] columns = [] for key, val in fields.items(): if key != "_id": columns.append(key) print("\n\n--------------------------") print(key)