bikeshare.py
def load_data(city, month, day):
    """
    Loads data for the specified city and filters by month and day if applicable.

    Args:
        (str) city - name of the city to analyze
        (str) month - name of the month to filter by, or "all" to apply no month filter
        (str) day - name of the day of week to filter by, or "all" to apply no day filter
    Returns:
        df - Pandas DataFrame containing city data filtered by month and day
    """
    # load data file into pandas dataframe
    df = pd.read_csv(city_files.get(city))

    # convert the Start Time to a to datetime format
    # year is not needed, since they're all 2017
    df['Start Time'] = pd.to_datetime(df['Start Time'], yearfirst = True)
    #print(df)
    # create new df with columns for month, day, weekday, and hour
    fdf = df
    fdf['month'] = df['Start Time'].dt.month
    fdf['day'] = df['Start Time'].dt.weekday
    fdf['hour'] = df['Start Time'].dt.hour
    fdf['trip'] = "from " + df['Start Station'] + " to " + df['End Station']

    # can also add more filter, based on the day of the month and so on.

    #print(fdf['month'])
    #By seeing the output, they're returned in numbers, hence the creation
    #of dictionaries instead of lists for months and weekdays.
    # filter df by month/day/both or none
    #print(fdf)
    return df, fdf

    Loads data for the specified city and filters by month and day if applicable.

    Args:
        (str) city - name of the city to analyze
        (str) month - name of the month to filter by, or "all" to apply no month filter
        (str) day - name of the day of week to filter by, or "all" to apply no day filter
    Returns:
        df - Pandas DataFrame containing city data filtered by month and day
    
Loads data for the specified city and filters by month and day if applicable.
Args:
(str) city - name of the city to analyze
(str) month - name of the month to filter by, or "all" to apply no month filter
(str) day - name of the day of week to filter by, or "all" to apply no day filter
Returns:
df - Pandas DataFrame containing city data filtered by month and day
Loads data for the specified city and filters by month and day if applicable . Args : ( str ) city - name of the city to analyze ( str ) month - name of the month to filter by or " all " to apply no month filter ( str ) day - name of the day of week to filter by or " all " to apply no day filter Returns : df - Pandas DataFrame containing city data filtered by month and day
def load_data(city, month, day):
    df = pd.read_csv(city_files.get(city))
    df['Start Time'] = pd.to_datetime(df['Start Time'], yearfirst = True)
    fdf = df
    fdf['month'] = df['Start Time'].dt.month
    fdf['day'] = df['Start Time'].dt.weekday
    fdf['hour'] = df['Start Time'].dt.hour
    fdf['trip'] = "from " + df['Start Station'] + " to " + df['End Station']
    return df, fdf
def load_data ( city , month , day ) : df = pd . read_csv ( city_files . get ( city ) ) df [ 'Start Time' ] = pd . to_datetime ( df [ 'Start Time' ] , yearfirst = True ) fdf = df fdf [ 'month' ] = df [ 'Start Time' ] . dt . month fdf [ 'day' ] = df [ 'Start Time' ] . dt . weekday fdf [ 'hour' ] = df [ 'Start Time' ] . dt . hour fdf [ 'trip' ] = "from " + df [ 'Start Station' ] + " to " + df [ 'End Station' ] return df , fdf
Loads data for the specified city and filters by month and day if applicable.
Loads data for the specified city and filters by month and day if applicable .
"""
    Loads data for the specified city and filters by month and day if applicable.

    Args:
        (str) city - name of the city to analyze
        (str) month - name of the month to filter by, or "all" to apply no month filter
        (str) day - name of the day of week to filter by, or "all" to apply no day filter
    Returns:
        df - Pandas DataFrame containing city data filtered by month and day
    """ # load data file into pandas dataframe
 # convert the Start Time to a to datetime format
 # year is not needed, since they're all 2017
 #print(df)
 # create new df with columns for month, day, weekday, and hour
 # can also add more filter, based on the day of the month and so on.
 #print(fdf['month'])
 #By seeing the output, they're returned in numbers, hence the creation
 #of dictionaries instead of lists for months and weekdays.
 # filter df by month/day/both or none
 #print(fdf)

city
month
day