home/bikeshare.py
def station_stats(df):
    """Displays statistics on the most popular stations and trip."""

    print('\nCalculating The Most Popular Stations and Trip...\n')
    start_time = time.time()

    # TO DO: display most commonly used start station
    ss = df['Start Station']
    start_station = ss.mode()
    print ("Most Common Used Start Station :",start_station,sep = " ")

    # TO DO: display most commonly used end station
    es = df['Start Station'].mode()
    print("Most Common Used End Station:",es, sep = " ")


    # TO DO: display most frequent combination of start station and end station trip
    df["frequent stations"] = df["Start Station"].map(str) + " to " + df["End Station"]
    fs_mode = df["frequent stations"].mode()
    print ("Most Frequent Combination of Start and End Station:", fs_mode, sep = " ")

    print("\nThis took %s seconds." % (time.time() - start_time))
    print('-'*40)
Displays statistics on the most popular stations and trip.
Displays statistics on the most popular stations and trip.
Displays statistics on the most popular stations and trip .
def station_stats(df):
    print('\nCalculating The Most Popular Stations and Trip...\n')
    start_time = time.time()
    ss = df['Start Station']
    start_station = ss.mode()
    print ("Most Common Used Start Station :",start_station,sep = " ")
    es = df['Start Station'].mode()
    print("Most Common Used End Station:",es, sep = " ")
    df["frequent stations"] = df["Start Station"].map(str) + " to " + df["End Station"]
    fs_mode = df["frequent stations"].mode()
    print ("Most Frequent Combination of Start and End Station:", fs_mode, sep = " ")
    print("\nThis took %s seconds." % (time.time() - start_time))
    print('-'*40)
def station_stats ( df ) : print ( '\nCalculating The Most Popular Stations and Trip...\n' ) start_time = time . time ( ) ss = df [ 'Start Station' ] start_station = ss . mode ( ) print ( "Most Common Used Start Station :" , start_station , sep = " " ) es = df [ 'Start Station' ] . mode ( ) print ( "Most Common Used End Station:" , es , sep = " " ) df [ "frequent stations" ] = df [ "Start Station" ] . map ( str ) + " to " + df [ "End Station" ] fs_mode = df [ "frequent stations" ] . mode ( ) print ( "Most Frequent Combination of Start and End Station:" , fs_mode , sep = " " ) print ( "\nThis took %s seconds." % ( time . time ( ) - start_time ) ) print ( '-' * 40 )
Displays statistics on the most popular stations and trip.
Displays statistics on the most popular stations and trip .
"""Displays statistics on the most popular stations and trip.""" # TO DO: display most commonly used start station # TO DO: display most commonly used end station # TO DO: display most frequent combination of start station and end station trip
df