Realization of dataframe Front-end display on flask

is writing a simple web app in flask.
the function you want to achieve is:

  1. upload an excel file
  2. Clean up the data with pandas
  3. the resulting dataframe is previewed with a table at the front end
  4. After the
  5. preview is correct, upload it to the database

now it is stuck in 3. Front-end preview here. When you click the Preview button, you will always jump to the new path / extract and return the data in json format. The younger sister checked a lot of materials, jquery , jquery.datatables , bootstrap-table , all used it again. That is, an error will be reported in get / extract 400 . Please give us some advice!

views.py

@app.route("/extract", methods=["GET", "POST"])
def extract_excel():
    file = request.files["file"]
    filename = file.filename
    path = os.path.join(os.getcwd(), filename)
    file.save(path)

    -sharp  excel  df, 
       
    df_json = df.to_json(orient="records", force_ascii=False)
    return df_json

index.html

    <div>
      <form action="/extract" method="post" enctype="multipart/form-data">
        <input type="file" name="file"></input>
        <input type="text" name="upload_date" placeholder="2018-01-01"></input>
        <button type="submit" id="showtable"></button>
      </form>
    </div> 

ask for a front-end method no matter what plug-in is used. After clicking the "Preview" button, ajax can display dataframe on the current page. Thank you

.
Mar.19,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-7b45a3-1e9c5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-7b45a3-1e9c5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?