Free Workspace
  • AI Chat
  • Code
  • Report
  • Beta
    Spinner
    import numpy as np
    import pandas as pd
    import matplotlib.pyplot as plt
    import seaborn as sns
    import scipy
    import datetime
    
    %matplotlib inline
    x = np.array([2.2, 0.9, 4.4, 6.7, 2.8, 3.2, 1.1, 3.5])
    x_var = np.var(x)
    x_stdev = np.std(x)
    print('Variance: {:4.2f}'.format(x_var))
    print('Std Deviation: {:4.2f}'.format(x_stdev))
    # create a sample DataFrame
    df = pd.DataFrame({'name': ['Alice', 'Bob', 'Charlie'], 'age': [25, 30, 35], 'state': ['NY', 'CA', 'TX']})
    df
    
    df.age.apply(lambda x: x/10)
    Run error
    from datetime import timedelta
    1/timedelta(days=91)
    password = ''
    while password != 'fizzbuzz':
        password = input('Please enter the password: ')