home/bikeshare.py
def time_stats(df):
    """Displays statistics on the most frequent times of travel."""

    print('\nCalculating The Most Frequent Times of Travel...\n')
    start_time = time.time()

    # TO DO: display the most common month
    month_mode = pd.Series(pd.DatetimeIndex(df['Start Time'])).dt.month.mode()
    print("Most Common Month :", month_mode, sep = " ")
    
    # TO DO: display the most common day of week
    
    weekday_mode = pd.Series(pd.DatetimeIndex(df['Start Time'])).dt.weekday_name.mode()
    print("Most Common Day of the Week :",weekday_mode, sep = " ")

    # TO DO: display the most common start hour
    
    hour_mode = pd.Series(pd.DatetimeIndex(df['Start Time'])).dt.hour.mode()
    print ("Most Common Start Hour :",hour_mode, sep = " ")    

    print("\nThis took %s seconds." % (time.time() - start_time))
    print('-'*40)
Displays statistics on the most frequent times of travel.
Displays statistics on the most frequent times of travel.
Displays statistics on the most frequent times of travel .
def time_stats(df):
    print('\nCalculating The Most Frequent Times of Travel...\n')
    start_time = time.time()
    month_mode = pd.Series(pd.DatetimeIndex(df['Start Time'])).dt.month.mode()
    print("Most Common Month :", month_mode, sep = " ")
    weekday_mode = pd.Series(pd.DatetimeIndex(df['Start Time'])).dt.weekday_name.mode()
    print("Most Common Day of the Week :",weekday_mode, sep = " ")
    hour_mode = pd.Series(pd.DatetimeIndex(df['Start Time'])).dt.hour.mode()
    print ("Most Common Start Hour :",hour_mode, sep = " ")    
    print("\nThis took %s seconds." % (time.time() - start_time))
    print('-'*40)
def time_stats ( df ) : print ( '\nCalculating The Most Frequent Times of Travel...\n' ) start_time = time . time ( ) month_mode = pd . Series ( pd . DatetimeIndex ( df [ 'Start Time' ] ) ) . dt . month . mode ( ) print ( "Most Common Month :" , month_mode , sep = " " ) weekday_mode = pd . Series ( pd . DatetimeIndex ( df [ 'Start Time' ] ) ) . dt . weekday_name . mode ( ) print ( "Most Common Day of the Week :" , weekday_mode , sep = " " ) hour_mode = pd . Series ( pd . DatetimeIndex ( df [ 'Start Time' ] ) ) . dt . hour . mode ( ) print ( "Most Common Start Hour :" , hour_mode , sep = " " ) print ( "\nThis took %s seconds." % ( time . time ( ) - start_time ) ) print ( '-' * 40 )
Displays statistics on the most frequent times of travel.
Displays statistics on the most frequent times of travel .
"""Displays statistics on the most frequent times of travel.""" # TO DO: display the most common month # TO DO: display the most common day of week # TO DO: display the most common start hour
df