scripts/step3.py
def days_stats(df):
    """Gets the daily counts by weekday and plots the daily counts.

    Parameters
    ----------
    df : pandas.DataFrame
        A pandas DataFrame containing job offers data.

    """

    weekdays = df["isodate"].dt.weekday.value_counts()
    weekdays.sort_index(inplace=True)

    print(weekdays.to_markdown(floatfmt=",.0f"))

    # Create a Series with the counts of each day.
    days_counts = df["isodate"].value_counts()
    days_counts.sort_index(inplace=True)

    # Create a new DataFrame with only the data of Mondays.
    monday_df = days_counts[days_counts.index.weekday == 0]

    # Initialize our Figure.
    fig = go.Figure()

    fig.add_traces(go.Scatter(x=days_counts.index, y=days_counts.values, line_color="#ffa000",
                              mode="markers+lines", line_width=3, marker_size=12))

    # Highlight Mondays with a bigger marker.
    fig.add_traces(go.Scatter(x=monday_df.index, y=monday_df.values,
                              line_color="#c6ff00", mode="markers", marker_size=18))

    fig.update_xaxes(title="Date (2020)", ticks="outside", ticklen=10, gridwidth=0.5,
                     tickcolor="#FFFFFF", linewidth=2, showline=True, mirror=True, nticks=12)

    fig.update_yaxes(title="Number of Job Offers", ticks="outside", ticklen=10, gridwidth=0.5,
                     tickcolor="#FFFFFF", linewidth=2, showline=True, mirror=True, nticks=12)

    # Add final customizations.
    fig.update_layout(
        showlegend=False,
        width=1200,
        height=800,
        font_color="#FFFFFF",
        font_size=18,
        title_text="Job Offers by Day",
        title_x=0.5,
        title_y=0.93,
        margin_l=120,
        margin_b=120,
        title_font_size=30,
        paper_bgcolor="#37474f",
        plot_bgcolor="#263238"
    )

    fig.write_image("1.png")
Gets the daily counts by weekday and plots the daily counts.

    Parameters
    ----------
    df : pandas.DataFrame
        A pandas DataFrame containing job offers data.

    
Gets the daily counts by weekday and plots the daily counts.
Parameters

df : pandas.DataFrame
A pandas DataFrame containing job offers data.
Gets the daily counts by weekday and plots the daily counts . Parameters df : pandas . DataFrame A pandas DataFrame containing job offers data .
def days_stats(df):
    weekdays = df["isodate"].dt.weekday.value_counts()
    weekdays.sort_index(inplace=True)
    print(weekdays.to_markdown(floatfmt=",.0f"))
    days_counts = df["isodate"].value_counts()
    days_counts.sort_index(inplace=True)
    monday_df = days_counts[days_counts.index.weekday == 0]
    fig = go.Figure()
    fig.add_traces(go.Scatter(x=days_counts.index, y=days_counts.values, line_color="#ffa000",
                              mode="markers+lines", line_width=3, marker_size=12))
    fig.add_traces(go.Scatter(x=monday_df.index, y=monday_df.values,
                              line_color="#c6ff00", mode="markers", marker_size=18))
    fig.update_xaxes(title="Date (2020)", ticks="outside", ticklen=10, gridwidth=0.5,
                     tickcolor="#FFFFFF", linewidth=2, showline=True, mirror=True, nticks=12)
    fig.update_yaxes(title="Number of Job Offers", ticks="outside", ticklen=10, gridwidth=0.5,
                     tickcolor="#FFFFFF", linewidth=2, showline=True, mirror=True, nticks=12)
    fig.update_layout(
        showlegend=False,
        width=1200,
        height=800,
        font_color="#FFFFFF",
        font_size=18,
        title_text="Job Offers by Day",
        title_x=0.5,
        title_y=0.93,
        margin_l=120,
        margin_b=120,
        title_font_size=30,
        paper_bgcolor="#37474f",
        plot_bgcolor="#263238"
    )
    fig.write_image("1.png")
def days_stats ( df ) : weekdays = df [ "isodate" ] . dt . weekday . value_counts ( ) weekdays . sort_index ( inplace = True ) print ( weekdays . to_markdown ( floatfmt = ",.0f" ) ) days_counts = df [ "isodate" ] . value_counts ( ) days_counts . sort_index ( inplace = True ) monday_df = days_counts [ days_counts . index . weekday == 0 ] fig = go . Figure ( ) fig . add_traces ( go . Scatter ( x = days_counts . index , y = days_counts . values , line_color = "#ffa000" , mode = "markers+lines" , line_width = 3 , marker_size = 12 ) ) fig . add_traces ( go . Scatter ( x = monday_df . index , y = monday_df . values , line_color = "#c6ff00" , mode = "markers" , marker_size = 18 ) ) fig . update_xaxes ( title = "Date (2020)" , ticks = "outside" , ticklen = 10 , gridwidth = 0.5 , tickcolor = "#FFFFFF" , linewidth = 2 , showline = True , mirror = True , nticks = 12 ) fig . update_yaxes ( title = "Number of Job Offers" , ticks = "outside" , ticklen = 10 , gridwidth = 0.5 , tickcolor = "#FFFFFF" , linewidth = 2 , showline = True , mirror = True , nticks = 12 ) fig . update_layout ( showlegend = False , width = 1200 , height = 800 , font_color = "#FFFFFF" , font_size = 18 , title_text = "Job Offers by Day" , title_x = 0.5 , title_y = 0.93 , margin_l = 120 , margin_b = 120 , title_font_size = 30 , paper_bgcolor = "#37474f" , plot_bgcolor = "#263238" ) fig . write_image ( "1.png" )
Gets the daily counts by weekday and plots the daily counts.
Gets the daily counts by weekday and plots the daily counts .
"""Gets the daily counts by weekday and plots the daily counts.

    Parameters
    ----------
    df : pandas.DataFrame
        A pandas DataFrame containing job offers data.

    """ # Create a Series with the counts of each day. # Create a new DataFrame with only the data of Mondays. # Initialize our Figure. # Highlight Mondays with a bigger marker. # Add final customizations.
df