{"id":7260,"date":"2023-08-21T09:10:03","date_gmt":"2023-08-21T17:10:03","guid":{"rendered":"https:\/\/live-cometml.pantheonsite.io\/?p=7260"},"modified":"2025-04-24T17:14:40","modified_gmt":"2025-04-24T17:14:40","slug":"streamlit-app-for-data-science-projects","status":"publish","type":"post","link":"https:\/\/www.comet.com\/site\/blog\/streamlit-app-for-data-science-projects\/","title":{"rendered":"Streamlit App for Data Science Projects"},"content":{"rendered":"\n<link rel=\"canonical\" href=\"https:\/\/www.comet.com\/site\/blog\/streamlit-app-for-data-science-projects\">\n\n\n\n<div class=\"fh fi fj fk fl\">\n<div class=\"ab ca\">\n<div class=\"ch bg et eu ev ew\">\n<p id=\"9f37\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">Streamlit is an open-source Python library that makes it easy to build and share custom web applications for <strong class=\"be mq\">machine learning<\/strong> and <strong class=\"be mq\">data science<\/strong>projects.<\/p>\n<p id=\"e4f6\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">You can visualize your data with different Streamlit elements and also you can use Html, CSS, and JavaScript codes in your Streamlit app. This means that you can develop professional web applications.<\/p>\n<p id=\"4661\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">Okay, we can dive into the details for the app web application! I often use Streamlit. Today, I will introduce you to the features I often encounter and share my own tips and some detailed information.<\/p>\n<p id=\"1363\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">With this Medium Blog, we will develop a Streamlit page together, step by step. I will explain all the steps in detail. We will create a home page consisting of two tabs and sidebars, Lightside and Darkside. On this page, we will list our data in different formats, show it with graphs, and see how different pieces of code are added to our Streamlit code.<\/p>\n<figure class=\"mu mv mw mx my mz mr ms paragraph-image\">\n<div class=\"na nb eb nc bg nd\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg ne nf c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*yh52I03YVQq9JjYDVmSzag.png\" alt=\"\" width=\"700\" height=\"325\"><\/figure><div class=\"mr ms mt\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*yh52I03YVQq9JjYDVmSzag.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*yh52I03YVQq9JjYDVmSzag.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*yh52I03YVQq9JjYDVmSzag.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*yh52I03YVQq9JjYDVmSzag.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*yh52I03YVQq9JjYDVmSzag.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*yh52I03YVQq9JjYDVmSzag.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*yh52I03YVQq9JjYDVmSzag.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*yh52I03YVQq9JjYDVmSzag.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*yh52I03YVQq9JjYDVmSzag.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*yh52I03YVQq9JjYDVmSzag.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*yh52I03YVQq9JjYDVmSzag.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*yh52I03YVQq9JjYDVmSzag.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*yh52I03YVQq9JjYDVmSzag.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*yh52I03YVQq9JjYDVmSzag.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<\/figure>\n<h1 id=\"0662\" class=\"ng nh fo be ni nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od bj\" data-selectable-paragraph=\"\">Meet with Streamlit<\/h1>\n<p id=\"842c\" class=\"pw-post-body-paragraph lt lu fo be b lv oe lx ly lz of mb mc md og mf mg mh oh mj mk ml oi mn mo mp fh bj\" data-selectable-paragraph=\"\">Streamlit presents so many features such as buttons, sidebar, page design, checkbox, and more. You can also visit <a class=\"af oj\" href=\"https:\/\/streamlit.io\/\" target=\"_blank\" rel=\"noopener ugc nofollow\">Streamlit\u2019s tutorial <\/a>on the website.<\/p>\n<p id=\"a73b\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">Today&#8217;s goal is to meet with Streamlit and develop the first data web page!<\/p>\n<p id=\"262d\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">I created a small dataset by collecting my own Twitter statistics. I will create a web page with Streamlit and display this dataset on this page. We will look at visualizing, presenting, and displaying the dataset on our web page by interfering with the dataframe. You can reach this data and code on <a class=\"af oj\" href=\"https:\/\/github.com\/irem-komurcu\/streamlit-app\" target=\"_blank\" rel=\"noopener ugc nofollow\">my <em class=\"ok\">GitHub repo.<\/em><\/a><\/p>\n<p id=\"346e\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">This image is an excel data part and I will use only some columns.<\/p>\n<figure class=\"mu mv mw mx my mz mr ms paragraph-image\">\n<div class=\"na nb eb nc bg nd\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg ne nf c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*HSECAKfDTKEccYI4yopYBw.png\" alt=\"\" width=\"700\" height=\"402\"><\/figure><div class=\"mr ms ol\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*HSECAKfDTKEccYI4yopYBw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*HSECAKfDTKEccYI4yopYBw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*HSECAKfDTKEccYI4yopYBw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*HSECAKfDTKEccYI4yopYBw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*HSECAKfDTKEccYI4yopYBw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*HSECAKfDTKEccYI4yopYBw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*HSECAKfDTKEccYI4yopYBw.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*HSECAKfDTKEccYI4yopYBw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*HSECAKfDTKEccYI4yopYBw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*HSECAKfDTKEccYI4yopYBw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*HSECAKfDTKEccYI4yopYBw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*HSECAKfDTKEccYI4yopYBw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*HSECAKfDTKEccYI4yopYBw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*HSECAKfDTKEccYI4yopYBw.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div><figcaption class=\"om on oo mr ms op oq be b bf z dv\" data-selectable-paragraph=\"\">Twitter monthly data<\/figcaption><\/figure>\n<p id=\"e090\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">First, I should import my data to code with a CSV file for more than readability.<\/p>\n<pre>import pandas as pd\n\ndata = pd.read_csv(\"twitter.csv\", sep=\";\")<\/pre>\n<p id=\"5162\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">I added a CSV file and next is going to Streamlit!<\/p>\n<pre>import pandas as pd\nimport streamlit as st\n\ndata = pd.read_csv(\"twitter.csv\", sep=\",\")\nst.write(data)<\/pre>\n<p id=\"f778\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">Only I added streamlit and used the \u201cwrite\u201d function, and I have a web page on my local! I am seeing my data with this write function. You can use <a class=\"af oj\" href=\"https:\/\/streamlit.io\/\" target=\"_blank\" rel=\"noopener ugc nofollow\">Streamlit website<\/a> for installing and creating env.<\/p>\n<figure class=\"mu mv mw mx my mz mr ms paragraph-image\">\n<div class=\"na nb eb nc bg nd\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg ne nf c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*IZrsONSA3xEDx6TY3Xi57w.png\" alt=\"\" width=\"700\" height=\"302\"><\/figure><div class=\"mr ms ou\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*IZrsONSA3xEDx6TY3Xi57w.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*IZrsONSA3xEDx6TY3Xi57w.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*IZrsONSA3xEDx6TY3Xi57w.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*IZrsONSA3xEDx6TY3Xi57w.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*IZrsONSA3xEDx6TY3Xi57w.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*IZrsONSA3xEDx6TY3Xi57w.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*IZrsONSA3xEDx6TY3Xi57w.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*IZrsONSA3xEDx6TY3Xi57w.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*IZrsONSA3xEDx6TY3Xi57w.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*IZrsONSA3xEDx6TY3Xi57w.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*IZrsONSA3xEDx6TY3Xi57w.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*IZrsONSA3xEDx6TY3Xi57w.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*IZrsONSA3xEDx6TY3Xi57w.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*IZrsONSA3xEDx6TY3Xi57w.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<\/figure>\n<h1 id=\"939b\" class=\"ng nh fo be ni nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od bj\" data-selectable-paragraph=\"\">Layout and Containers<\/h1>\n<ul class=\"\">\n<li id=\"7150\" class=\"lt lu fo be b lv oe lx ly lz of mb mc ov og mf mg ow oh mj mk ox oi mn mo mp oy oz pa bj\" data-selectable-paragraph=\"\">Organizing page? Sounds great!<\/li>\n<\/ul>\n<p id=\"56c7\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">We can organize our own web page and Streamlit is presenting some features about it. We can split cells, and web pages inside and we can group images, texts, and elements.<\/p>\n<p id=\"f8e8\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">It is possible to create more organized page structures with the elements we will use in layouts and containers. With the sidebar we will use in our example below, we can decide how to visualize our data with quick actions on the left while we can visualize our data on the right. This means pages where we can take real-time actions and see our data clearly!<\/p>\n<h2 id=\"9af2\" class=\"pb nh fo be ni pc pd pe nm pf pg ph nq md pi pj pk mh pl pm pn ml po pp pq pr bj\" data-selectable-paragraph=\"\">Sidebar<\/h2>\n<p id=\"8852\" class=\"pw-post-body-paragraph lt lu fo be b lv oe lx ly lz of mb mc md og mf mg mh oh mj mk ml oi mn mo mp fh bj\" data-selectable-paragraph=\"\">We can create an area for our page elements like text, buttons, etc.<\/p>\n<pre>import pandas as pd\nimport streamlit as st\n\ndata = pd.read_csv(\"twitter.csv\", sep=\",\")\nst.write(data)\n\nwith st.sidebar:\n  st.write(\"Here is sidebar\")<\/pre>\n<p id=\"7a02\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">I used a sidebar func with Streamlit and I wrote a text. You can see the result below.<\/p>\n<figure class=\"mu mv mw mx my mz mr ms paragraph-image\">\n<div class=\"na nb eb nc bg nd\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg ne nf c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*MTnEmyrdFANf1fwzYd41aA.png\" alt=\"\" width=\"700\" height=\"308\"><\/figure><div class=\"mr ms ps\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*MTnEmyrdFANf1fwzYd41aA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*MTnEmyrdFANf1fwzYd41aA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*MTnEmyrdFANf1fwzYd41aA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*MTnEmyrdFANf1fwzYd41aA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*MTnEmyrdFANf1fwzYd41aA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*MTnEmyrdFANf1fwzYd41aA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*MTnEmyrdFANf1fwzYd41aA.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*MTnEmyrdFANf1fwzYd41aA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*MTnEmyrdFANf1fwzYd41aA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*MTnEmyrdFANf1fwzYd41aA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*MTnEmyrdFANf1fwzYd41aA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*MTnEmyrdFANf1fwzYd41aA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*MTnEmyrdFANf1fwzYd41aA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*MTnEmyrdFANf1fwzYd41aA.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<\/figure>\n<h2 id=\"bd9a\" class=\"pb nh fo be ni pc pd pe nm pf pg ph nq md pi pj pk mh pl pm pn ml po pp pq pr bj\" data-selectable-paragraph=\"\">Tabs<\/h2>\n<ul class=\"\">\n<li id=\"f9ac\" class=\"lt lu fo be b lv oe lx ly lz of mb mc ov og mf mg ow oh mj mk ox oi mn mo mp oy oz pa bj\" data-selectable-paragraph=\"\">Page in page? Why not!<\/li>\n<\/ul>\n<p id=\"e927\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">You can see the tabs\u2019 default function below.<\/p>\n<pre class=\"mu mv mw mx my pt pu pv pw ax px bj\"><span id=\"ab4f\" class=\"pb nh fo pu b ho py pz l ie qa\" data-selectable-paragraph=\"\">st.tabs(tabs)<\/span><\/pre>\n<p id=\"b784\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">I will create special tabs with my design. I will create these tabs with markdown but I will show the design tabs in detail in the next steps.<\/p>\n<p id=\"ab87\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">I am creating 2 tabs and the names are \u201cLight Side\u201d and \u201cDark Side.\u201d And I am showing my data frame result in Light Side tabs.<\/p>\n<pre>def tabs(default_tabs = [], default_active_tab=0):\n    if not default_tabs:\n        return None\n\n    active_tab = st.radio(\"\", default_tabs, index=default_active_tab, key='tabs')\n    child = default_tabs.index(active_tab)+1\n\nactive_tab = tabs([\"Light Side\", \"Dark Side\"])\n\nif (active_tab == \"Light Side\"):\n    st.write(data)<\/pre>\n<figure class=\"mu mv mw mx my mz mr ms paragraph-image\">\n<div class=\"na nb eb nc bg nd\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg ne nf c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*T0wIRFtKcnZ4Ua-Pq-AaRw.png\" alt=\"\" width=\"700\" height=\"323\"><\/figure><div class=\"mr ms qb\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*T0wIRFtKcnZ4Ua-Pq-AaRw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*T0wIRFtKcnZ4Ua-Pq-AaRw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*T0wIRFtKcnZ4Ua-Pq-AaRw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*T0wIRFtKcnZ4Ua-Pq-AaRw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*T0wIRFtKcnZ4Ua-Pq-AaRw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*T0wIRFtKcnZ4Ua-Pq-AaRw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*T0wIRFtKcnZ4Ua-Pq-AaRw.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*T0wIRFtKcnZ4Ua-Pq-AaRw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*T0wIRFtKcnZ4Ua-Pq-AaRw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*T0wIRFtKcnZ4Ua-Pq-AaRw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*T0wIRFtKcnZ4Ua-Pq-AaRw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*T0wIRFtKcnZ4Ua-Pq-AaRw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*T0wIRFtKcnZ4Ua-Pq-AaRw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*T0wIRFtKcnZ4Ua-Pq-AaRw.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<\/figure>\n<h2 id=\"408a\" class=\"pb nh fo be ni pc pd pe nm pf pg ph nq md pi pj pk mh pl pm pn ml po pp pq pr bj\" data-selectable-paragraph=\"\">Column<\/h2>\n<p id=\"dcea\" class=\"pw-post-body-paragraph lt lu fo be b lv oe lx ly lz of mb mc md og mf mg mh oh mj mk ml oi mn mo mp fh bj\" data-selectable-paragraph=\"\">Another step of being organized is the use of columns. We can add images, text, and different content by dividing our page into columns.<\/p>\n<pre class=\"mu mv mw mx my pt pu pv pw ax px bj\"><span id=\"c936\" class=\"pb nh fo pu b ho py pz l ie qa\" data-selectable-paragraph=\"\">st.columns(spec, *, gap=\"small\")<\/span><\/pre>\n<p id=\"528d\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">In this step, I made an example with two columns and full of text. I performed the column separation process in the second tab (Dark Side).<\/p>\n<pre>if (active_tab == \"Light Side\"):\n    st.write(data)\n\nelse:\n    layout = st.columns([1, 2])\n    with layout[0]:\n        st.write(\"Column A\")\n\n    with layout[-1]:\n        st.write(\"Column B\")<\/pre>\n<figure class=\"mu mv mw mx my mz mr ms paragraph-image\">\n<div class=\"na nb eb nc bg nd\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg ne nf c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*9GYB9mRahzQGOHW5Odz88Q.png\" alt=\"\" width=\"700\" height=\"250\"><\/figure><div class=\"mr ms qc\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*9GYB9mRahzQGOHW5Odz88Q.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*9GYB9mRahzQGOHW5Odz88Q.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*9GYB9mRahzQGOHW5Odz88Q.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*9GYB9mRahzQGOHW5Odz88Q.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*9GYB9mRahzQGOHW5Odz88Q.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*9GYB9mRahzQGOHW5Odz88Q.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*9GYB9mRahzQGOHW5Odz88Q.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*9GYB9mRahzQGOHW5Odz88Q.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*9GYB9mRahzQGOHW5Odz88Q.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*9GYB9mRahzQGOHW5Odz88Q.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*9GYB9mRahzQGOHW5Odz88Q.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*9GYB9mRahzQGOHW5Odz88Q.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*9GYB9mRahzQGOHW5Odz88Q.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*9GYB9mRahzQGOHW5Odz88Q.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<\/figure>\n<h1 id=\"dd65\" class=\"ng nh fo be ni nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od bj\" data-selectable-paragraph=\"\">Elements<\/h1>\n<p id=\"e2a4\" class=\"pw-post-body-paragraph lt lu fo be b lv oe lx ly lz of mb mc md og mf mg mh oh mj mk ml oi mn mo mp fh bj\" data-selectable-paragraph=\"\">With Streamlit you can add different elements to your application. Button, slidebar, checkbox, and more.<\/p>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"fh fi fj fk fl\">\n<div class=\"ab ca\">\n<div class=\"ch bg et eu ev ew\">\n<blockquote class=\"ql\"><p id=\"657d\" class=\"qm qn fo be qo qp qq qr qs qt qu mp dv\" data-selectable-paragraph=\"\">The most important thing to keep in mind when building and deploying your model? Understanding your end-goal. <a class=\"af oj\" href=\"https:\/\/www.comet.com\/site\/blog\/industry-qa-where-most-machine-learning-projects-fail\/?utm_source=heartbeat&amp;utm_medium=referral&amp;utm_campaign=AMS_US_EN_AWA_heartbeat_CTA\" target=\"_blank\" rel=\"noopener ugc nofollow\">Read our interview<\/a> with ML experts from Stanford, Google, and HuggingFace to learn more.<\/p><\/blockquote>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"fh fi fj fk fl\">\n<div class=\"ab ca\">\n<div class=\"ch bg et eu ev ew\">\n<h2 id=\"a6b6\" class=\"pb nh fo be ni pc pd pe nm pf pg ph nq md pi pj pk mh pl pm pn ml po pp pq pr bj\" data-selectable-paragraph=\"\"><strong class=\"al\">Buttons:<\/strong><\/h2>\n<p id=\"7e49\" class=\"pw-post-body-paragraph lt lu fo be b lv oe lx ly lz of mb mc md og mf mg mh oh mj mk ml oi mn mo mp fh bj\" data-selectable-paragraph=\"\">I think one of the features I use the most is the Button. You can visualize your data, get in-page printouts and show different data by adding different prerequisites.<\/p>\n<pre class=\"mu mv mw mx my pt pu pv pw ax px bj\"><span id=\"ff39\" class=\"pb nh fo pu b ho py pz l ie qa\" data-selectable-paragraph=\"\">st.button(label, key=None, help=None, on_click=None, args=None, kwargs=None, *, disabled=False)<\/span><\/pre>\n<figure class=\"mu mv mw mx my mz mr ms paragraph-image\">\n<div class=\"na nb eb nc bg nd\" tabindex=\"0\" role=\"button\">\n<div class=\"mr ms ou\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*z_UJQdPAxmoBP0jO8S8vYQ.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*z_UJQdPAxmoBP0jO8S8vYQ.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*z_UJQdPAxmoBP0jO8S8vYQ.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*z_UJQdPAxmoBP0jO8S8vYQ.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*z_UJQdPAxmoBP0jO8S8vYQ.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*z_UJQdPAxmoBP0jO8S8vYQ.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*z_UJQdPAxmoBP0jO8S8vYQ.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*z_UJQdPAxmoBP0jO8S8vYQ.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*z_UJQdPAxmoBP0jO8S8vYQ.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*z_UJQdPAxmoBP0jO8S8vYQ.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*z_UJQdPAxmoBP0jO8S8vYQ.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*z_UJQdPAxmoBP0jO8S8vYQ.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*z_UJQdPAxmoBP0jO8S8vYQ.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*z_UJQdPAxmoBP0jO8S8vYQ.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<div class=\"mr ms ou\">\n<pre>if st.sidebar.button('Get Results'):\n    if (active_tab == \"Light Side\"):\n        st.write(data)\n    else:\n        layout = st.columns([1, 2])\n        with layout[0]:\n            st.write(\"Column A\")\n        with layout[-1]:\n            st.write(\"Column B\")<\/pre>\n<\/div>\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg ne nf c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*z_UJQdPAxmoBP0jO8S8vYQ.png\" alt=\"\" width=\"700\" height=\"302\"><\/figure><div class=\"mr ms ou\"><picture><\/picture><\/div>\n<\/div>\n<\/figure>\n<h2 id=\"cf72\" class=\"pb nh fo be ni pc pd pe nm pf pg ph nq md pi pj pk mh pl pm pn ml po pp pq pr bj\" data-selectable-paragraph=\"\">Checkbox:<\/h2>\n<p id=\"6348\" class=\"pw-post-body-paragraph lt lu fo be b lv oe lx ly lz of mb mc md og mf mg mh oh mj mk ml oi mn mo mp fh bj\" data-selectable-paragraph=\"\">Yes or no? It\u2019s the checkbox\u2019s job to look for the answer to this question.<\/p>\n<pre class=\"mu mv mw mx my pt pu pv pw ax px bj\"><span id=\"6db9\" class=\"pb nh fo pu b ho py pz l ie qa\" data-selectable-paragraph=\"\">st.checkbox(label, value=False, key=None, help=None, on_change=None, args=None, kwargs=None, *, disabled=False)<\/span><\/pre>\n<p id=\"e505\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">I created a code sample for checkbox and button usage. If users like this app and wanna get results, we can show our data! I included text, a checkbox, and a button in the sidebar area.<\/p>\n<pre>with st.sidebar:\n    st.write(\"Do you like this app?\")\n    cbox = st.checkbox('yes')\n\nif st.sidebar.button('Get Results'):\n    if cbox:\n        if (active_tab == \"Light Side\"):\n            st.write(data)\n        else:\n            layout = st.columns([1, 2])\n            with layout[0]:\n                st.write(\"Column A\")\n\n            with layout[-1]:\n                st.write(\"Column B\")<\/pre>\n<figure class=\"mu mv mw mx my mz mr ms paragraph-image\">\n<div class=\"na nb eb nc bg nd\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg ne nf c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*iO8SQJlHKaQ5gO2F8c9yCA.png\" alt=\"\" width=\"700\" height=\"281\"><\/figure><div class=\"mr ms qv\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*iO8SQJlHKaQ5gO2F8c9yCA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*iO8SQJlHKaQ5gO2F8c9yCA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*iO8SQJlHKaQ5gO2F8c9yCA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*iO8SQJlHKaQ5gO2F8c9yCA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*iO8SQJlHKaQ5gO2F8c9yCA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*iO8SQJlHKaQ5gO2F8c9yCA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*iO8SQJlHKaQ5gO2F8c9yCA.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*iO8SQJlHKaQ5gO2F8c9yCA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*iO8SQJlHKaQ5gO2F8c9yCA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*iO8SQJlHKaQ5gO2F8c9yCA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*iO8SQJlHKaQ5gO2F8c9yCA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*iO8SQJlHKaQ5gO2F8c9yCA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*iO8SQJlHKaQ5gO2F8c9yCA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*iO8SQJlHKaQ5gO2F8c9yCA.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<\/figure>\n<h2 id=\"fd0d\" class=\"pb nh fo be ni pc pd pe nm pf pg ph nq md pi pj pk mh pl pm pn ml po pp pq pr bj\" data-selectable-paragraph=\"\">DataFrame, Table and Different Versions with Streamlit<\/h2>\n<p id=\"6b47\" class=\"pw-post-body-paragraph lt lu fo be b lv oe lx ly lz of mb mc md og mf mg mh oh mj mk ml oi mn mo mp fh bj\" data-selectable-paragraph=\"\">Streamlit supports different content such as tables, data frames, and text. You can print it in Streamlit according to the entity you will give.<\/p>\n<p id=\"861d\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">In this title, I will give an example of a Dataframe:<\/p>\n<pre class=\"mu mv mw mx my pt pu pv pw ax px bj\"><span id=\"76d0\" class=\"pb nh fo pu b ho py pz l ie qa\" data-selectable-paragraph=\"\">st.dataframe(data=None, width=None, height=None, *, use_container_width=False)<\/span><\/pre>\n<p id=\"6676\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">We have seen that with the write function we can print a data frame as if it were printing text. We can get data frame output on the screen with both the write function and the data frame function. You can use these functions ready-made in Streamlit, and you can easily get printouts for Data Science projects.<\/p>\n<pre>if st.sidebar.button('Get Results'):\n    if cbox:\n        if (active_tab == \"Light Side\"):\n            st.write(data)\n            st.dataframe(data[\"Tweet Impressions\"])<\/pre>\n<p id=\"b021\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">You can see our data output for the write function and data frame function below. We can take our data and the fields we want our data to be displayed specifically from the data frame and produce special output.<\/p>\n<figure class=\"mu mv mw mx my mz mr ms paragraph-image\">\n<div class=\"na nb eb nc bg nd\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg ne nf c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*r6y87mrQ-1fcZ5IppVmpCA.png\" alt=\"\" width=\"700\" height=\"390\"><\/figure><div class=\"mr ms qw\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*r6y87mrQ-1fcZ5IppVmpCA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*r6y87mrQ-1fcZ5IppVmpCA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*r6y87mrQ-1fcZ5IppVmpCA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*r6y87mrQ-1fcZ5IppVmpCA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*r6y87mrQ-1fcZ5IppVmpCA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*r6y87mrQ-1fcZ5IppVmpCA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*r6y87mrQ-1fcZ5IppVmpCA.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*r6y87mrQ-1fcZ5IppVmpCA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*r6y87mrQ-1fcZ5IppVmpCA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*r6y87mrQ-1fcZ5IppVmpCA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*r6y87mrQ-1fcZ5IppVmpCA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*r6y87mrQ-1fcZ5IppVmpCA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*r6y87mrQ-1fcZ5IppVmpCA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*r6y87mrQ-1fcZ5IppVmpCA.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<\/figure>\n<h1 id=\"d7bd\" class=\"ng nh fo be ni nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od bj\" data-selectable-paragraph=\"\">Chart\/Visualize with Streamlit<\/h1>\n<p id=\"2234\" class=\"pw-post-body-paragraph lt lu fo be b lv oe lx ly lz of mb mc md og mf mg mh oh mj mk ml oi mn mo mp fh bj\" data-selectable-paragraph=\"\">With the help of Charts, we can visualize our data, analyze our data, and get summary information. When we say \u201cPython\u201d and \u201cData,\u201d we can think of charts, which are part of data analysis and data visualization. With Streamlit, we can also use charts and quickly include them in our code. Let\u2019s examine the examples!<\/p>\n<figure class=\"mu mv mw mx my mz mr ms paragraph-image\">\n<div class=\"na nb eb nc bg nd\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg ne nf c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*Uw3IaV-wHnYkMUrLBVTfpg.jpeg\" alt=\"\" width=\"700\" height=\"467\"><\/figure><div class=\"mr ms qx\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*Uw3IaV-wHnYkMUrLBVTfpg.jpeg 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*Uw3IaV-wHnYkMUrLBVTfpg.jpeg 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*Uw3IaV-wHnYkMUrLBVTfpg.jpeg 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*Uw3IaV-wHnYkMUrLBVTfpg.jpeg 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*Uw3IaV-wHnYkMUrLBVTfpg.jpeg 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*Uw3IaV-wHnYkMUrLBVTfpg.jpeg 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*Uw3IaV-wHnYkMUrLBVTfpg.jpeg 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*Uw3IaV-wHnYkMUrLBVTfpg.jpeg 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*Uw3IaV-wHnYkMUrLBVTfpg.jpeg 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*Uw3IaV-wHnYkMUrLBVTfpg.jpeg 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*Uw3IaV-wHnYkMUrLBVTfpg.jpeg 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*Uw3IaV-wHnYkMUrLBVTfpg.jpeg 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*Uw3IaV-wHnYkMUrLBVTfpg.jpeg 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*Uw3IaV-wHnYkMUrLBVTfpg.jpeg 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"om on oo mr ms op oq be b bf z dv\" data-selectable-paragraph=\"\">Photo by <a class=\"af oj\" href=\"https:\/\/unsplash.com\/es\/@isaacmsmith?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noopener ugc nofollow\">Isaac Smith<\/a> on <a class=\"af oj\" href=\"https:\/\/unsplash.com\/s\/photos\/charts?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noopener ugc nofollow\">Unsplash<\/a><\/figcaption>\n<\/figure>\n<p id=\"30a2\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">When I say data visualization, I think of features such as Plotly, Pyplot, and mapping. The great news is that Streamlit supports them. Let\u2019s exemplify Pyplot from these features!<\/p>\n<p id=\"cdc6\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">Here I drew a line chart for the Tweets column in our data.<\/p>\n<pre>st.line_chart(data['Tweets'])<\/pre>\n<p id=\"b750\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">The output is very clean, very visual and very modern!<\/p>\n<figure class=\"mu mv mw mx my mz mr ms paragraph-image\">\n<div class=\"na nb eb nc bg nd\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg ne nf c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*yh52I03YVQq9JjYDVmSzag.png\" alt=\"\" width=\"700\" height=\"325\"><\/figure><div class=\"mr ms mt\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*yh52I03YVQq9JjYDVmSzag.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*yh52I03YVQq9JjYDVmSzag.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*yh52I03YVQq9JjYDVmSzag.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*yh52I03YVQq9JjYDVmSzag.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*yh52I03YVQq9JjYDVmSzag.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*yh52I03YVQq9JjYDVmSzag.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*yh52I03YVQq9JjYDVmSzag.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*yh52I03YVQq9JjYDVmSzag.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*yh52I03YVQq9JjYDVmSzag.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*yh52I03YVQq9JjYDVmSzag.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*yh52I03YVQq9JjYDVmSzag.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*yh52I03YVQq9JjYDVmSzag.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*yh52I03YVQq9JjYDVmSzag.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*yh52I03YVQq9JjYDVmSzag.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<\/figure>\n<h1 id=\"f640\" class=\"ng nh fo be ni nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od bj\" data-selectable-paragraph=\"\">Code in Streamlit<\/h1>\n<p id=\"60ea\" class=\"pw-post-body-paragraph lt lu fo be b lv oe lx ly lz of mb mc md og mf mg mh oh mj mk ml oi mn mo mp fh bj\" data-selectable-paragraph=\"\">We added the Markdown code to our Streamlit code that we give examples of. Streamlit supports different types including Markdown.<\/p>\n<p id=\"5087\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">The support I want to talk about is the support it provides for HTML, CSS, and Javascript codes. While developing data science projects and working with Python, we may need to add HTML, CSS, and Javascript codes to our code in order not to compromise some visual and functional features. This can be for the visual elements we need to add, or it can be for customizing a component in Streamlit. Streamlit supports us to add different pieces of code<\/p>\n<h1 id=\"30d6\" class=\"ng nh fo be ni nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od bj\" data-selectable-paragraph=\"\">Theme<\/h1>\n<p id=\"8094\" class=\"pw-post-body-paragraph lt lu fo be b lv oe lx ly lz of mb mc md og mf mg mh oh mj mk ml oi mn mo mp fh bj\" data-selectable-paragraph=\"\">This is my favorite part! Streamlit supports different theme features and I love that.<\/p>\n<p id=\"be81\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">You can change the background, text color, and font. Streamlit uses some default elements and you can design this.<\/p>\n<p id=\"a8c0\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">For <strong class=\"be mq\">web site theme<\/strong>, the default is your computer&#8217;s default. This means that if you are using the dark theme, your page will be dark. That&#8217;s awesome! Also, directly you can select a theme, and then you can design your website page.<\/p>\n<p id=\"0ceb\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">Also, you can color texts, change fonts, and you can create your contents like a rainbow.<\/p>\n<h1 id=\"43c0\" class=\"ng nh fo be ni nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od bj\" data-selectable-paragraph=\"\">Deploy App<\/h1>\n<p id=\"b2e3\" class=\"pw-post-body-paragraph lt lu fo be b lv oe lx ly lz of mb mc md og mf mg mh oh mj mk ml oi mn mo mp fh bj\" data-selectable-paragraph=\"\">The part where I\u2019m going to publish an app is the hardest part. Choosing where to publish, looking at cloud environments, and determining publishing details according to needs. One of the things that makes Streamlit special is that it hosts the Streamlit Cloud feature and offers options for those who will deploy their application.<\/p>\n<figure class=\"mu mv mw mx my mz mr ms paragraph-image\">\n<div class=\"na nb eb nc bg nd\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg ne nf c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*6eI8tSUjjEa1wRKuz_aTQQ.png\" alt=\"\" width=\"700\" height=\"190\"><\/figure><div class=\"mr ms qy\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*6eI8tSUjjEa1wRKuz_aTQQ.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*6eI8tSUjjEa1wRKuz_aTQQ.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*6eI8tSUjjEa1wRKuz_aTQQ.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*6eI8tSUjjEa1wRKuz_aTQQ.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*6eI8tSUjjEa1wRKuz_aTQQ.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*6eI8tSUjjEa1wRKuz_aTQQ.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*6eI8tSUjjEa1wRKuz_aTQQ.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*6eI8tSUjjEa1wRKuz_aTQQ.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*6eI8tSUjjEa1wRKuz_aTQQ.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*6eI8tSUjjEa1wRKuz_aTQQ.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*6eI8tSUjjEa1wRKuz_aTQQ.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*6eI8tSUjjEa1wRKuz_aTQQ.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*6eI8tSUjjEa1wRKuz_aTQQ.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*6eI8tSUjjEa1wRKuz_aTQQ.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<\/figure>\n<p id=\"1a26\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">You can publish your Data Science projects with Streamlit Cloud and benefit from Docker and Kubernetes tools.<\/p>\n<p id=\"6b1f\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">I\u2019ve added the code that contains the whole sample code snippet to my <a class=\"af oj\" href=\"https:\/\/github.com\/irem-komurcu\/streamlit-app\" target=\"_blank\" rel=\"noopener ugc nofollow\"><strong class=\"be mq\">GitHub repository<\/strong><\/a>. You can get the results I gave in the example by downloading the code and installing Streamlit on your computer.<\/p>\n<p id=\"0f78\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">With this blog, I presented a Streamlit Data Science project. You can <a class=\"af oj\" href=\"https:\/\/iremkomurcu.medium.com\/\" rel=\"noopener\"><strong class=\"be mq\">follow my Medium account<\/strong><\/a>, if you like the article, you can present your appreciation <strong class=\"be mq\">with claps<\/strong>.<\/p>\n<p id=\"b354\" class=\"pw-post-body-paragraph lt lu fo be b lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp fh bj\" data-selectable-paragraph=\"\">You can also follow and communicate with me on social media. Thanks!<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Streamlit is an open-source Python library that makes it easy to build and share custom web applications for machine learning and data scienceprojects. You can visualize your data with different Streamlit elements and also you can use Html, CSS, and JavaScript codes in your Streamlit app. This means that you can develop professional web applications. [&hellip;]<\/p>\n","protected":false},"author":74,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"customer_name":"","customer_description":"","customer_industry":"","customer_technologies":"","customer_logo":"","footnotes":""},"categories":[6],"tags":[],"coauthors":[171],"class_list":["post-7260","post","type-post","status-publish","format-standard","hentry","category-machine-learning"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Streamlit App for Data Science Projects - Comet<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.comet.com\/site\/blog\/streamlit-app-for-data-science-projects\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Streamlit App for Data Science Projects\" \/>\n<meta property=\"og:description\" content=\"Streamlit is an open-source Python library that makes it easy to build and share custom web applications for machine learning and data scienceprojects. You can visualize your data with different Streamlit elements and also you can use Html, CSS, and JavaScript codes in your Streamlit app. This means that you can develop professional web applications. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.comet.com\/site\/blog\/streamlit-app-for-data-science-projects\/\" \/>\n<meta property=\"og:site_name\" content=\"Comet\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/cometdotml\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-21T17:10:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-24T17:14:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*yh52I03YVQq9JjYDVmSzag.png\" \/>\n<meta name=\"author\" content=\"Irem Komurcu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@Cometml\" \/>\n<meta name=\"twitter:site\" content=\"@Cometml\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Irem Komurcu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Streamlit App for Data Science Projects - Comet","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.comet.com\/site\/blog\/streamlit-app-for-data-science-projects\/","og_locale":"en_US","og_type":"article","og_title":"Streamlit App for Data Science Projects","og_description":"Streamlit is an open-source Python library that makes it easy to build and share custom web applications for machine learning and data scienceprojects. You can visualize your data with different Streamlit elements and also you can use Html, CSS, and JavaScript codes in your Streamlit app. This means that you can develop professional web applications. [&hellip;]","og_url":"https:\/\/www.comet.com\/site\/blog\/streamlit-app-for-data-science-projects\/","og_site_name":"Comet","article_publisher":"https:\/\/www.facebook.com\/cometdotml","article_published_time":"2023-08-21T17:10:03+00:00","article_modified_time":"2025-04-24T17:14:40+00:00","og_image":[{"url":"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*yh52I03YVQq9JjYDVmSzag.png","type":"","width":"","height":""}],"author":"Irem Komurcu","twitter_card":"summary_large_image","twitter_creator":"@Cometml","twitter_site":"@Cometml","twitter_misc":{"Written by":"Irem Komurcu","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.comet.com\/site\/blog\/streamlit-app-for-data-science-projects\/#article","isPartOf":{"@id":"https:\/\/www.comet.com\/site\/blog\/streamlit-app-for-data-science-projects\/"},"author":{"name":"Irem Komurcu","@id":"https:\/\/www.comet.com\/site\/#\/schema\/person\/bd9f8cd6514218b6ad4a7620a68ba1eb"},"headline":"Streamlit App for Data Science Projects","datePublished":"2023-08-21T17:10:03+00:00","dateModified":"2025-04-24T17:14:40+00:00","mainEntityOfPage":{"@id":"https:\/\/www.comet.com\/site\/blog\/streamlit-app-for-data-science-projects\/"},"wordCount":1330,"publisher":{"@id":"https:\/\/www.comet.com\/site\/#organization"},"image":{"@id":"https:\/\/www.comet.com\/site\/blog\/streamlit-app-for-data-science-projects\/#primaryimage"},"thumbnailUrl":"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*yh52I03YVQq9JjYDVmSzag.png","articleSection":["Machine Learning"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.comet.com\/site\/blog\/streamlit-app-for-data-science-projects\/","url":"https:\/\/www.comet.com\/site\/blog\/streamlit-app-for-data-science-projects\/","name":"Streamlit App for Data Science Projects - Comet","isPartOf":{"@id":"https:\/\/www.comet.com\/site\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.comet.com\/site\/blog\/streamlit-app-for-data-science-projects\/#primaryimage"},"image":{"@id":"https:\/\/www.comet.com\/site\/blog\/streamlit-app-for-data-science-projects\/#primaryimage"},"thumbnailUrl":"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*yh52I03YVQq9JjYDVmSzag.png","datePublished":"2023-08-21T17:10:03+00:00","dateModified":"2025-04-24T17:14:40+00:00","breadcrumb":{"@id":"https:\/\/www.comet.com\/site\/blog\/streamlit-app-for-data-science-projects\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.comet.com\/site\/blog\/streamlit-app-for-data-science-projects\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.comet.com\/site\/blog\/streamlit-app-for-data-science-projects\/#primaryimage","url":"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*yh52I03YVQq9JjYDVmSzag.png","contentUrl":"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*yh52I03YVQq9JjYDVmSzag.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.comet.com\/site\/blog\/streamlit-app-for-data-science-projects\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.comet.com\/site\/"},{"@type":"ListItem","position":2,"name":"Streamlit App for Data Science Projects"}]},{"@type":"WebSite","@id":"https:\/\/www.comet.com\/site\/#website","url":"https:\/\/www.comet.com\/site\/","name":"Comet","description":"Build Better Models Faster","publisher":{"@id":"https:\/\/www.comet.com\/site\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.comet.com\/site\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.comet.com\/site\/#organization","name":"Comet ML, Inc.","alternateName":"Comet","url":"https:\/\/www.comet.com\/site\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.comet.com\/site\/#\/schema\/logo\/image\/","url":"https:\/\/www.comet.com\/site\/wp-content\/uploads\/2025\/01\/logo_comet_square.png","contentUrl":"https:\/\/www.comet.com\/site\/wp-content\/uploads\/2025\/01\/logo_comet_square.png","width":310,"height":310,"caption":"Comet ML, Inc."},"image":{"@id":"https:\/\/www.comet.com\/site\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/cometdotml","https:\/\/x.com\/Cometml","https:\/\/www.youtube.com\/channel\/UCmN63HKvfXSCS-UwVwmK8Hw"]},{"@type":"Person","@id":"https:\/\/www.comet.com\/site\/#\/schema\/person\/bd9f8cd6514218b6ad4a7620a68ba1eb","name":"Irem Komurcu","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.comet.com\/site\/#\/schema\/person\/image\/40f7738f502b3180fb9452d4b9ed449a","url":"https:\/\/www.comet.com\/site\/wp-content\/uploads\/2023\/08\/1649927440797-96x96.jpg","contentUrl":"https:\/\/www.comet.com\/site\/wp-content\/uploads\/2023\/08\/1649927440797-96x96.jpg","caption":"Irem Komurcu"},"url":"https:\/\/www.comet.com\/site\/blog\/author\/iremkomurcubmgmail-com\/"}]}},"_links":{"self":[{"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/posts\/7260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/users\/74"}],"replies":[{"embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/comments?post=7260"}],"version-history":[{"count":1,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/posts\/7260\/revisions"}],"predecessor-version":[{"id":15575,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/posts\/7260\/revisions\/15575"}],"wp:attachment":[{"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/media?parent=7260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/categories?post=7260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/tags?post=7260"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/coauthors?post=7260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}