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

    print('\nCalculating Trip Duration...\n')
    start_time = time.time()
    # display total travel time
    duration_total = fdf['Trip Duration'].sum(skipna = True)
    total_rounded = str(round(duration_total, 1))
    print("Total trip durations are: " + total_rounded + " in seconds")
    # display mean travel time
    duration_mean = fdf['Trip Duration'].mean(skipna = True)
    mean_rounded = str(round(duration_mean, 1))
    print("The average trip duration period is: " + mean_rounded + " in seconds")

    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(fdf):
    print('\nCalculating Trip Duration...\n')
    start_time = time.time()
    duration_total = fdf['Trip Duration'].sum(skipna = True)
    total_rounded = str(round(duration_total, 1))
    print("Total trip durations are: " + total_rounded + " in seconds")
    duration_mean = fdf['Trip Duration'].mean(skipna = True)
    mean_rounded = str(round(duration_mean, 1))
    print("The average trip duration period is: " + mean_rounded + " in seconds")
    print("\nThis took %s seconds." % (time.time() - start_time))
    print('-'*40)
def trip_duration_stats ( fdf ) : print ( '\nCalculating Trip Duration...\n' ) start_time = time . time ( ) duration_total = fdf [ 'Trip Duration' ] . sum ( skipna = True ) total_rounded = str ( round ( duration_total , 1 ) ) print ( "Total trip durations are: " + total_rounded + " in seconds" ) duration_mean = fdf [ 'Trip Duration' ] . mean ( skipna = True ) mean_rounded = str ( round ( duration_mean , 1 ) ) print ( "The average trip duration period is: " + mean_rounded + " in seconds" ) 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.""" # display total travel time
 # display mean travel time

fdf