以下R代码对应的python代码是什么?

What is the python code corresponding to the following R code?

我有 5 年的月销售额,我将 R 中的以下代码应用于季节性图:

ggseasonplot(S5, year.labels=TRUE, year.labels.left=TRUE)

那么如何使用 pythonic 方式绘制它呢?

import pandas as pd
import io, requests
import plotly.express as px

# use requests so that there are no issues with utf-8 encoding
df = pd.read_csv(
    io.StringIO(
        requests.get(
            "https://raw.githubusercontent.com/joaolcorreia/RFM-analysis/master/sample-orders.csv"
        ).text
    )
)
df["order_date"] = pd.to_datetime(df["order_date"])

px.line(
    df.assign(
        year=df["order_date"].dt.year,
        month=df["order_date"].dt.month,
        month_name=df["order_date"].dt.strftime("%b"),
    )
    .groupby(["year", "month", "month_name"], as_index=False)
    .agg(value=("grand_total", "sum")),
    x="month_name",
    y="value",
    color="year",
)