scripts/step3.py
def hours_worked_salary(df):
    """Plots the correlation between salary and daily hours worked in a Scatter plot.

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

    """

    # Remove outliers.
    df = df[df["salary"] <= 35000]

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

    fig.add_traces(go.Scatter(x=df["hours_worked"], y=df["salary"], line_color="#ffa000",
                              mode="markers", line_width=3, marker_size=8))

    fig.update_xaxes(title="Number of Daily Hours", ticks="outside", ticklen=10,
                     tickcolor="#FFFFFF", title_standoff=30, linewidth=2, showline=True, mirror=True, nticks=25, gridwidth=0.5)

    fig.update_yaxes(title="Monthly Salary in MXN", ticks="outside", ticklen=10, separatethousands=True,
                     tickcolor="#FFFFFF", title_standoff=20, linewidth=2, showline=True, mirror=True, nticks=12, gridwidth=0.5)

    # Add final customizations.
    fig.update_layout(
        showlegend=False,
        width=1200,
        height=800,
        font_color="#FFFFFF",
        font_size=18,
        title_text="Comparison of Hours Worked and Monthly Salary",
        title_x=0.5,
        title_y=0.93,
        margin_l=140,
        margin_b=120,
        title_font_size=30,
        paper_bgcolor="#37474f",
        plot_bgcolor="#263238"
    )

    fig.write_image("11.png")
Plots the correlation between salary and daily hours worked in a Scatter plot.

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

    
Plots the correlation between salary and daily hours worked in a Scatter plot.
Parameters

df : pandas.DataFrame
A pandas DataFrame containing job offers data.
Plots the correlation between salary and daily hours worked in a Scatter plot . Parameters df : pandas . DataFrame A pandas DataFrame containing job offers data .
def hours_worked_salary(df):
    df = df[df["salary"] <= 35000]
    fig = go.Figure()
    fig.add_traces(go.Scatter(x=df["hours_worked"], y=df["salary"], line_color="#ffa000",
                              mode="markers", line_width=3, marker_size=8))
    fig.update_xaxes(title="Number of Daily Hours", ticks="outside", ticklen=10,
                     tickcolor="#FFFFFF", title_standoff=30, linewidth=2, showline=True, mirror=True, nticks=25, gridwidth=0.5)
    fig.update_yaxes(title="Monthly Salary in MXN", ticks="outside", ticklen=10, separatethousands=True,
                     tickcolor="#FFFFFF", title_standoff=20, linewidth=2, showline=True, mirror=True, nticks=12, gridwidth=0.5)
    fig.update_layout(
        showlegend=False,
        width=1200,
        height=800,
        font_color="#FFFFFF",
        font_size=18,
        title_text="Comparison of Hours Worked and Monthly Salary",
        title_x=0.5,
        title_y=0.93,
        margin_l=140,
        margin_b=120,
        title_font_size=30,
        paper_bgcolor="#37474f",
        plot_bgcolor="#263238"
    )
    fig.write_image("11.png")
def hours_worked_salary ( df ) : df = df [ df [ "salary" ] <= 35000 ] fig = go . Figure ( ) fig . add_traces ( go . Scatter ( x = df [ "hours_worked" ] , y = df [ "salary" ] , line_color = "#ffa000" , mode = "markers" , line_width = 3 , marker_size = 8 ) ) fig . update_xaxes ( title = "Number of Daily Hours" , ticks = "outside" , ticklen = 10 , tickcolor = "#FFFFFF" , title_standoff = 30 , linewidth = 2 , showline = True , mirror = True , nticks = 25 , gridwidth = 0.5 ) fig . update_yaxes ( title = "Monthly Salary in MXN" , ticks = "outside" , ticklen = 10 , separatethousands = True , tickcolor = "#FFFFFF" , title_standoff = 20 , linewidth = 2 , showline = True , mirror = True , nticks = 12 , gridwidth = 0.5 ) fig . update_layout ( showlegend = False , width = 1200 , height = 800 , font_color = "#FFFFFF" , font_size = 18 , title_text = "Comparison of Hours Worked and Monthly Salary" , title_x = 0.5 , title_y = 0.93 , margin_l = 140 , margin_b = 120 , title_font_size = 30 , paper_bgcolor = "#37474f" , plot_bgcolor = "#263238" ) fig . write_image ( "11.png" )
Plots the correlation between salary and daily hours worked in a Scatter plot.
Plots the correlation between salary and daily hours worked in a Scatter plot .
"""Plots the correlation between salary and daily hours worked in a Scatter plot.

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

    """ # Remove outliers. # Initialize our Figure. # Add final customizations.
df