streamlit explanation Japanese translation

The following Japanese translation. https://docs.streamlit.io/en/latest/main_concepts.html

Create an app

Execution method

streamlit run your_script.py [-- script args]

As soon as you run the script as above, the local Streamlit server will start and the app will open in a new tab in your default web browser. The app is your canvas, where you draw charts, text, widgets, tables and more.

What you draw in the app is up to you. For example, st.text writes raw text to the app and st.line_chart draws a line chart. See the API documentation for all available commands.

Development flow

Save the source file each time you update the app. Once saved, Streamlit will detect if there are any changes and ask if you want to rerun the app. If you select "Always Rerun" at the top right of the screen, the app will be updated automatically every time you change the source code.

Data flow

Streamlit's architecture allows you to write apps in the same way you write plain Python scripts. Whenever you need to update something on your screen, Streamlit reruns your entire Python script from top to bottom.

This can happen in two situations.

--When you change the source code of the app. --When the user interacts with the widget in the app.

Data display and style

There are several ways to view data (tables, arrays, data frames) in the Streamlit app. First, I introduced you to magic and st.write (), which can write anything from text to tables. Now let's take a look at the methods designed to visualize the data.

Why not always use st.write ()? There are several reasons.

Magic and st.write () inspect the type of data passed and determine how your app renders it best. You may want to draw in a different way. For example, instead of drawing a data frame as an interactive table, you may want to use st.table (df) to draw it as a static table.

The second reason is that other methods return objects that you can use or modify by adding or replacing data.

Finally, if you use the more specialized Streamlit method, you can pass additional arguments to customize the behavior.

For example, let's create a data frame and format it with a Pandas Styler object. This example uses Numpy to generate a random sample and the st.dataframe () method to draw an interactive table.

Recommended Posts

streamlit explanation Japanese translation
streamlit tutorial Japanese translation
sosreport Japanese translation
man systemd Japanese translation
man systemd.service Japanese translation
man nftables Japanese translation
Dockerfile reference Japanese translation
docker-compose --help Japanese translation
docker help Japanese translation
docker build --help Japanese translation
Japanese translation of sysstat manual
Japanese translation of Linux manual
docker run --help Japanese translation
Docker mysql quick reference Japanese translation
Japanese translation of the e2fsprogs manual
Compose file version 3 reference Japanese translation
Biopython Tutorial and Cookbook Japanese translation (4.1)
Biopython Tutorial and Cookbook Japanese translation (4.5)
Biopython Tutorial and Cookbook Japanese translation (4.8)
Biopython Tutorial and Cookbook Japanese translation (4.7)
Japanese translation of the man-db manual
Appropriate Japanese translation of pytorch tensor_tutorial
Biopython Tutorial and Cookbook Japanese translation (4.9)
Biopython Tutorial and Cookbook Japanese translation (4.6)
Japanese translation of the util-linux manual
Biopython Tutorial and Cookbook Japanese translation (4.2)
Biopython Tutorial and Cookbook Japanese translation (4.4)
Japanese translation of the iproute2 manual
Apache Spark Document Japanese Translation --Submitting Applications
Apache Spark Document Japanese Translation --Quick Start
Japanese translation of the LDP man-pages manual
[Google App Engine] User Objects (Japanese translation)
Getting started: 30 seconds to Keras Japanese translation
Biopython Tutorial and Cookbook Japanese translation (Chapter 1, 2)
Japanese translation: PEP 20 --The Zen of Python