人気プログラミング言語ランキング3年連続で2位[3] 5 本発表ではPythonによる開発をアップデートする手段を紹介 [2] PyPI · The Python Package Index(https://pypi.org/) [3] The 2021 State of the Octoverse | The GitHub Blog(https://github.blog/2021-11-16-the-2021-state-of-the-octoverse/)
class User(BaseModel): id: int name: str # 半角空白を含む(※前後以外) age: int = Field(ge=20) @validator("name") def check_contain_space(cls, v): if " " not in v.strip(): # 前後の半角空白を無視 raise ValueError("ensure this value contains spaces") return v.strip() # 前後の半角空白を削除 デコレーターによる詳細な バリデーションの実現も可能 (例:半角空白を含むかを判定)
License 2.0[14] 75 pip install streamlit [13] streamlit • The fastest way to build and share data apps(https://streamlit.io/) [14] streamlit/LICENSE at develop · streamlit/streamlit(https://github.com/streamlit/streamlit/blob/develop/LICENSE)
import LogisticRegression import streamlit as st iris = load_iris() x = pd.DataFrame(iris.data, columns=iris.feature_names) y = pd.DataFrame(iris.target, columns=["target"]) model = LogisticRegression(random_state=123) model.fit(x, y) streamlitに関するコード〜モデルの作成〜 97