home/bikeshare.py
def trip_duration_stats(df):
    """Displays statistics on the total and average trip duration."""

    print('\nCalculating Trip Duration...\n')
    start_time = time.time()

    # TO DO: display total travel time
    ttt = df['Trip Duration'].sum()
    print("Total Travel Time:",ttt, sep = " ")


    # TO DO: display mean travel time
    td_mean = df['Trip Duration'].mean()
    print ("Mean Travel :",td_mean, sep= " ")


    print("\nThis took %s seconds." % (time.time() - start_time))
    print('-'*40)
Displays statistics on the total and average trip duration.
Displays statistics on the total and average trip duration.
Displays statistics on the total and average trip duration .
def trip_duration_stats(df):
    print('\nCalculating Trip Duration...\n')
    start_time = time.time()
    ttt = df['Trip Duration'].sum()
    print("Total Travel Time:",ttt, sep = " ")
    td_mean = df['Trip Duration'].mean()
    print ("Mean Travel :",td_mean, sep= " ")
    print("\nThis took %s seconds." % (time.time() - start_time))
    print('-'*40)
def trip_duration_stats ( df ) : print ( '\nCalculating Trip Duration...\n' ) start_time = time . time ( ) ttt = df [ 'Trip Duration' ] . sum ( ) print ( "Total Travel Time:" , ttt , sep = " " ) td_mean = df [ 'Trip Duration' ] . mean ( ) print ( "Mean Travel :" , td_mean , sep = " " ) print ( "\nThis took %s seconds." % ( time . time ( ) - start_time ) ) print ( '-' * 40 )
Displays statistics on the total and average trip duration.
Displays statistics on the total and average trip duration .
"""Displays statistics on the total and average trip duration.""" # TO DO: display total travel time # TO DO: display mean travel time
df