Exemplo n.º 1
0
pd.options.display.max_colwidth = 100
pd.options.display.max_columns = 10

# ##### Examples: FS #####
# Load workout-history table to dataframe
# Note the 'u' in front, denoting a unicode string

collections = [
    u'workout-history',
    u'can-eat-options',
    u'exercises',
    u'food-items',
]

firestore = FS.FS()

# Get all exercises that have a string instead of a DocRef
wh = collections[0]
firestore.loadCollection(wh)
workoutHistory = firestore.collections[wh]
df = pd.DataFrame.from_dict(data)
filtered = df[df['Exercise'].apply(isinstance, args=(str, ))]

# # Normalize Data
# Update "Hex deadlift", "Shoulder press", "Bent over row" to title case.
filtered['Exercise']  # show data


# Define a function that checks for title case. Must have value for all use cases.
def isNotTitle(string):