<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Oyindamola Okunola. O on Medium]]></title>
        <description><![CDATA[Stories by Oyindamola Okunola. O on Medium]]></description>
        <link>https://medium.com/@oyindamolaoronigbagbe?source=rss-1bf708189a0c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Gz07oYik43dwIbnfSBl11Q@2x.jpeg</url>
            <title>Stories by Oyindamola Okunola. O on Medium</title>
            <link>https://medium.com/@oyindamolaoronigbagbe?source=rss-1bf708189a0c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 22:29:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@oyindamolaoronigbagbe/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[SQL Templates: Best Practices for Data Science]]></title>
            <link>https://python.plainenglish.io/sql-templates-best-practices-for-data-science-cf7d3d5740f9?source=rss-1bf708189a0c------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf7d3d5740f9</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Oyindamola Okunola. O]]></dc:creator>
            <pubDate>Tue, 03 Oct 2023 00:08:37 GMT</pubDate>
            <atom:updated>2023-10-03T00:49:12.055Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rVSS2BgnV4JAHrSq" /><figcaption>Photo by <a href="https://unsplash.com/@mjessier?utm_source=medium&amp;utm_medium=referral">Myriam Jessier</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>Introduction</strong></p><p>In the world of data science, the ability to extract, manipulate, and analyze data is paramount. One of the most versatile and widely used tools for this purpose is SQL (Structured Query Language). SQL allows data scientists to interact with relational databases, perform complex queries, and gain valuable insights from the data. To enhance efficiency and maintain a structured approach, data scientists often rely on SQL templates. In this article, we’ll explore SQL templates and best practices for leveraging them effectively in data science workflows.</p><p><strong>What Are SQL Templates?</strong></p><p>SQL templates are pre-defined SQL queries that can be customized and reused for various data analysis tasks. Instead of writing SQL queries from scratch every time, data scientists create templates that serve as a foundation for specific tasks, such as data extraction, transformation, or aggregation. These templates typically include placeholders for parameters that can be tailored to the specific analysis at hand.</p><p><strong>Best Practices for Using SQL Templates in Data Science:</strong></p><ol><li><strong>Modularize Your Templates: </strong>Divide your SQL templates into reusable modules based on common data operations. For example, create separate templates for data extraction, data transformation, and data aggregation. This modular approach makes it easier to maintain and update templates.</li><li><strong>Parameterization:</strong> Use placeholders or parameters in your SQL templates for dynamic inputs. Parameters can be replaced with specific values or variables during execution. Parameterization allows you to reuse templates for different datasets or time periods without modifying the underlying query structure.</li><li><strong>Documentation: </strong>Maintain thorough documentation for your SQL templates. Describe the purpose of each template, expected inputs, and any assumptions made in the query. Good documentation ensures that others can easily understand and use your templates.</li><li><strong>Version Control:</strong> Just like code, SQL templates should be version-controlled using tools like Git. This helps track changes, collaborate with team members, and revert to previous versions if necessary.</li><li><strong>Parameter Validation: </strong>Ensure that parameter values are validated to prevent SQL injection attacks and errors due to incorrect input. Use prepared statements or parameterized queries to handle user inputs securely.</li><li><strong>Testing:</strong> Before deploying SQL templates in production or using them for critical analysis, thoroughly test them on sample data. Verify that the templates return the expected results and handle edge cases gracefully.</li><li><strong>Performance Optimization: </strong>Optimize SQL templates for performance by indexing tables, minimizing joins, and using appropriate database features. Performance bottlenecks can often be addressed by optimizing the underlying SQL queries.</li><li><strong>Error Handling:</strong> Implement error handling mechanisms in your SQL templates to gracefully handle database errors or unexpected data conditions. This prevents query failures from disrupting your analysis.</li><li><strong>Use Frameworks or Libraries:</strong> Consider using SQL frameworks or libraries designed for data science tasks, such as pandasql for Python or dplyr for R. These tools simplify SQL integration into your data science workflows.</li><li><strong>Collaboration:</strong> Encourage collaboration by sharing SQL templates within your data science team. Collaborative templates can be a valuable resource for accelerating analysis and maintaining consistency.</li></ol><p><strong>Conclusion</strong></p><p>SQL templates are powerful tools that streamline data analysis workflows in data science. By adhering to best practices such as modularization, parameterization, documentation, and version control, data scientists can make the most of SQL templates to efficiently extract insights from data. Whether you’re working on exploratory data analysis, building machine learning models, or generating reports, SQL templates can significantly enhance your productivity and help you maintain a structured and organized approach to data analysis in your projects.</p><h3>In Plain English</h3><p><em>Thank you for being a part of our community! Before you go:</em></p><ul><li><em>Be sure to </em><strong><em>clap</em></strong><em> and </em><strong><em>follow</em></strong><em> the writer! 👏</em></li><li><em>You can find even more content at </em><a href="https://plainenglish.io/"><strong><em>PlainEnglish.io</em></strong></a><strong><em> 🚀</em></strong></li><li><em>Sign up for our </em><a href="http://newsletter.plainenglish.io/"><strong><em>free weekly newsletter</em></strong></a><em>. 🗞️</em></li><li><em>Follow us on </em><a href="https://twitter.com/inPlainEngHQ"><strong><em>Twitter</em></strong></a><strong><em>(X</em></strong>), <a href="https://www.linkedin.com/company/inplainenglish/"><strong><em>LinkedIn</em></strong></a>, <a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong><em>YouTube</em></strong></a>, and <a href="https://discord.gg/XxRS92b2"><strong><em>Discord</em></strong></a><strong><em>.</em></strong></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf7d3d5740f9" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/sql-templates-best-practices-for-data-science-cf7d3d5740f9">SQL Templates: Best Practices for Data Science</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Power of Data Analysis in Trading: Unlocking Potential Profits]]></title>
            <link>https://python.plainenglish.io/the-power-of-data-analysis-in-trading-unlocking-potential-profits-d589db4ff142?source=rss-1bf708189a0c------2</link>
            <guid isPermaLink="false">https://medium.com/p/d589db4ff142</guid>
            <category><![CDATA[investing]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[trading-tips]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Oyindamola Okunola. O]]></dc:creator>
            <pubDate>Mon, 02 Oct 2023 23:50:11 GMT</pubDate>
            <atom:updated>2023-10-03T00:49:35.236Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uyEib_ZeIpjgk9KVGxVlPg.jpeg" /></figure><p>In the world of finance, trading has always been a blend of art and science. While gut instincts and intuition play a role, today’s traders are increasingly turning to data analysis to make informed decisions. The importance of data analysis in trading cannot be overstated, as it can provide traders with a competitive edge, reduce risks, and unlock potential profits.</p><p><strong>The Traditional Trading Landscape</strong></p><p>Traditionally, trading was dominated by human brokers who relied on their experience, intuition, and market knowledge to make buy and sell decisions. While these methods can be effective, they are also prone to human biases and emotions, which can lead to impulsive and irrational decisions. In an age of rapidly changing financial markets, traders needed a more systematic and data-driven approach.</p><p><strong>The Rise of Data Analysis</strong></p><p>Enter data analysis. With the advent of powerful computers and access to vast amounts of financial data, traders began using data analysis techniques to gain insights into market trends, asset pricing, and risk management. Here’s why data analysis has become indispensable in the world of trading:</p><ol><li><strong>Informed Decision-Making: </strong>Data analysis enables traders to make informed decisions by examining historical price data, trading volumes, and market sentiment. By analyzing patterns and trends, traders can identify potential opportunities and threats.</li></ol><p><strong>2.</strong> <strong>Risk Management: </strong>Trading always involves an element of risk. Data analysis helps traders quantify and manage risks more effectively. By assessing historical volatility and correlations between assets, traders can build diversified portfolios and implement risk mitigation strategies.</p><p><strong>3.</strong> <strong>Algorithmic Trading:</strong> Data analysis is the backbone of algorithmic trading, where computer algorithms execute trades based on predefined rules and data inputs. These algorithms can process vast amounts of data in milliseconds, allowing for quick and precise executions.</p><p><strong>4. Market Sentiment Analysis:</strong> Social media and news sentiment analysis can provide valuable insights into market sentiment. By tracking social media mentions, news articles, and sentiment scores, traders can gauge market sentiment and adjust their strategies accordingly.</p><p><strong>5. Technical and Fundamental Analysis: </strong>Data analysis encompasses both technical analysis (using historical price charts and indicators) and fundamental analysis (examining financial statements and economic indicators). Combining these approaches can provide a comprehensive view of an asset’s value.</p><p><strong>6. Real-time Monitoring:</strong> In today’s fast-paced markets, real-time data analysis is crucial. Traders can use real-time data feeds and analytics tools to monitor market conditions, execute trades, and adjust strategies in response to changing circumstances.</p><p><strong>7. Backtesting and Optimization:</strong> Traders can test their strategies on historical data to assess their performance. By optimizing strategies based on past data, traders can fine-tune their approaches for future trades.</p><p><strong>Conclusion</strong></p><p>In the modern trading landscape, data analysis is not just an advantage; it’s a necessity. The ability to harness data to make informed decisions, manage risks, and adapt to changing market conditions is crucial for traders looking to succeed in an increasingly competitive and complex financial world.</p><p>While data analysis can’t eliminate all risks associated with trading, it certainly provides traders with a powerful toolkit to navigate these challenges. By leveraging data-driven insights and employing advanced analytics techniques, traders can make more informed decisions, improve their strategies, and increase their chances of unlocking potential profits in the world of trading. So, whether you’re a seasoned trader or just starting, embracing data analysis may be the key to your trading success.</p><h3>In Plain English</h3><p><em>Thank you for being a part of our community! Before you go:</em></p><ul><li><em>Be sure to </em><strong><em>clap</em></strong><em> and </em><strong><em>follow</em></strong><em> the writer! 👏</em></li><li><em>You can find even more content at </em><a href="https://plainenglish.io/"><strong><em>PlainEnglish.io</em></strong></a><strong><em> 🚀</em></strong></li><li><em>Sign up for our </em><a href="http://newsletter.plainenglish.io/"><strong><em>free weekly newsletter</em></strong></a><em>. 🗞️</em></li><li><em>Follow us on </em><a href="https://twitter.com/inPlainEngHQ"><strong><em>Twitter</em></strong></a><strong><em>(X</em></strong>), <a href="https://www.linkedin.com/company/inplainenglish/"><strong><em>LinkedIn</em></strong></a>, <a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong><em>YouTube</em></strong></a>, and <a href="https://discord.gg/XxRS92b2"><strong><em>Discord</em></strong></a><strong><em>.</em></strong></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d589db4ff142" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/the-power-of-data-analysis-in-trading-unlocking-potential-profits-d589db4ff142">The Power of Data Analysis in Trading: Unlocking Potential Profits</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Replace Missing Dataframe Values with a Machine Learning Algorithm]]></title>
            <link>https://python.plainenglish.io/predict-missing-dataframe-values-with-an-ml-algorithm-717cd872f1a8?source=rss-1bf708189a0c------2</link>
            <guid isPermaLink="false">https://medium.com/p/717cd872f1a8</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Oyindamola Okunola. O]]></dc:creator>
            <pubDate>Sun, 21 Nov 2021 12:10:36 GMT</pubDate>
            <atom:updated>2021-11-23T00:58:10.959Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Replace Missing Dataframe<br>Values with a Machine Learning Algorithm</h3><h4>A step-by-step guide to predicting missing data using an ML Algorithm.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N-mL9X-5yrK09Doq3saf8Q.jpeg" /><figcaption>Image from freepik.com</figcaption></figure><p>In this article, we are going to be learning how to replace missing values in our Pandas data frame with predicted values using an ML Algorithm. I will be walking us through the simple steps required to achieve this. This is undoubtedly one of the most accurate and efficient methods for handling missing data. Depending on the class of data that is missing, one can either use a regression or classification model to predict missing data.</p><h3><strong>Watch the Video Below:</strong></h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FxsmgNuhOH_Y%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DxsmgNuhOH_Y&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FxsmgNuhOH_Y%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/02b766a3911dfb783c1bd3806634e5ea/href">https://medium.com/media/02b766a3911dfb783c1bd3806634e5ea/href</a></iframe><h3><strong>Need For Exploratory Data Analysis:</strong></h3><p>Exploratory Data Analysis is an important step before you proceed to machine learning or modelling your data. By doing this you can get to know whether the selected features are ready for modelling, are all the features required, are there any correlations based on which we can either go back to the Data Pre-processing step or move on to modelling?.</p><h3><strong>Steps In Exploratory Data Analysis In Python</strong></h3><p>There are several steps for conducting exploratory data analysis, this includes:</p><ul><li>Description of data</li><li><strong>Handling missing data</strong></li><li>Handling outliers</li><li>Understanding relationships and new insights through plots</li></ul><h4><strong>Handling Missing Data</strong></h4><p>But for this article, our main focus will be on “Handling missing data”.</p><p>Data in the real world are rarely clean and homogeneous. Data can either be missing during data extraction or collection due to several reasons. Missing values need to be handled carefully because they reduce the quality of any of our performance metrics.</p><ul><li>Drop NULL or missing values</li><li>Fill Missing Values</li><li><strong>Predict Missing values with an ML Algorithm:</strong></li></ul><p>All methods described above except for the last method, might not eventually give us the accuracy we need during our data modelling. that’s why this article, focuses on handling missing data by <strong>Predicting Missing values with an ML Algorithm.</strong></p><h4><strong>Steps to Follow for Predicting Missing Values</strong></h4><p>Here, we look at the simple steps required to achieve this.</p><ol><li>Separate the null values from the data frame (df) and create a variable “test data”</li><li>Drop the null values from the data frame (df) and represent them as ‘train data”</li><li>Create “x_train” &amp; “y_train” from train data</li><li>Build the linear regression model</li><li>Create the x_test from test data</li><li>Apply the model on x_test of test data to make predictions</li><li>Replace the missing values with predicted values.</li></ol><h3><strong>Jupyter Notebook</strong></h3><p>We will be working from the <a href="https://jupyter.org/">Jupyter</a> Notebook. I will fire up my <a href="https://jupyter.org/">Jupyter</a> Notebook from the anaconda3 prompt as shown below and then type in “jupyter notebook” as shown below, after which I will hit the ‘enter button’ on my keyboard :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*IqMTgwIEKg7kOxnZNPKXZg.png" /><figcaption>Fig.1</figcaption></figure><h3>Create a new python 3 file:</h3><p>Click on the “New” drop-down at the right corner as seen on the image below and select ‘Python 3:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5DGSX11OV4Aa0-figLA0KA.png" /><figcaption>Fig.2</figcaption></figure><h3>Importing Pandas Library</h3><p>We are going to install the Pandas library using the command ‘import pandas as pd’. also, we will read an excel file as a data frame into our notebook as shown in the image below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*88o1xlimvPxPloGM1Bx6Mg.png" /><figcaption>Fig.3</figcaption></figure><p>Let’s check more details about our data frame using the command df.info() and also df.shape</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*YuIukzmWvVcOdtFhwbiNUg.png" /><figcaption>Fig.4</figcaption></figure><p>To reveal the number of null or missing values in our data frame, we use df.isnull().sum() as seen in the image below:</p><p>As you can see, we have in columns ‘A’ and ‘B’, 0 null values but in column ‘C’, we have 3 null values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/393/1*UB_ODcpQk6tcPIhfc83XbA.png" /><figcaption>Fig.5</figcaption></figure><h3>Steps to Predicting the Missing Data:</h3><p>Step 1: Separate the null values from the data frame (df) and create a variable “test data”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*XxFSHSPcQhn6jfhAK8Y9LQ.png" /><figcaption>Fig.6</figcaption></figure><p>Step 2: Drop the null values from the data frame (df) and represent them as ‘train data”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*_R1iiREKV5JZj6DcaXLEjQ.png" /><figcaption>Fig.7</figcaption></figure><p>Step 3: Create “x_train” &amp; “y_train” from train data.</p><p>In other to create the ‘x’ and ‘y_train’ From the data frame represented as train data, we would represent columns ‘A’ and ‘B” as x_train while column ‘C’ would represent our y_train as shown in the image below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*DzcawF88JO_Xw0xw9whQ0w.png" /><figcaption>Fig.8</figcaption></figure><p>Step 4: Build the linear regression model</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*EEEmnm8emYvGgrjQ6_3W_g.png" /><figcaption>Fig.9</figcaption></figure><p>Step 5: Create the x_test from test data</p><p>In other to create the x_test from our test_data, the columns ‘A’ &amp; ‘B’ would be represented as ‘x_test’ as shown in the image below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*lpBiD95b87VYSE5Tk-rutA.png" /><figcaption>Fig.10</figcaption></figure><p>Step 6: Apply the model on x_test of test data to make predictions. here, we have created a new variable ‘y_pred’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*btgsJo0pdeptuixOP4jUcg.png" /><figcaption>Fig.11</figcaption></figure><p>Step 7: Finally, we replace the missing values with predicted values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*Eqj-8MPcd6muYIQhai8B9w.png" /><figcaption>Fig.12</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*UR6hMP_oWBeWyUsBMWw3Yg.png" /><figcaption>Fig.13</figcaption></figure><p>Now, we have come to the end of our prediction. Our predicted values are seen in the image above. [3.58515012, 3.89903779, 4.45039355].</p><p>Thank you for sticking with me thus far!</p><p>Visit my GitHub page to get this code:</p><p><a href="https://github.com/DamolaChocolatebox/Predict-Missing-Dataframe-Values-with-an-ML-Algorithm">GitHub - DamolaChocolatebox/Predict-Missing-Dataframe-Values-with-an-ML-Algorithm: This is undoubtedly one of the accurate and most efficient methods for handling missing data. Depending on the class of data that is missing, one can either use a regression or classification model to predict missing data.</a></p><p><em>More content at </em><a href="http://plainenglish.io/"><em>plainenglish.io</em></a><em>. Sign up for our </em><a href="http://newsletter.plainenglish.io/"><em>free weekly newsletter here</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=717cd872f1a8" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/predict-missing-dataframe-values-with-an-ml-algorithm-717cd872f1a8">How to Replace Missing Dataframe Values with a Machine Learning Algorithm</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create a Simple Webform Using Streamlit]]></title>
            <link>https://python.plainenglish.io/how-to-create-a-simple-webform-using-streamlit-de4a2981df0c?source=rss-1bf708189a0c------2</link>
            <guid isPermaLink="false">https://medium.com/p/de4a2981df0c</guid>
            <category><![CDATA[streamlit]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[web-app-development]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Oyindamola Okunola. O]]></dc:creator>
            <pubDate>Tue, 09 Nov 2021 03:26:50 GMT</pubDate>
            <atom:updated>2021-11-11T07:42:34.073Z</atom:updated>
            <content:encoded><![CDATA[<h4>A guide to creating a simple form using Streamlit.</h4><p>In this article, I will be walking us through the process of creating a simple form using Streamlit. We will be working with widgets like buttons, sliders picker, text input, text area. Before we get started I recommend you to visit my <a href="https://github.com/DamolaChocolatebox">GitHub</a> page to get the commands used in this article. So, let’s get started.</p><p><strong>Watch the video below:</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FivU6X2TAqSM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DivU6X2TAqSM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FivU6X2TAqSM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/780db233cb0aa3844e775951e9693d02/href">https://medium.com/media/780db233cb0aa3844e775951e9693d02/href</a></iframe><p><a href="https://streamlit.io/"><strong>Streamlit </strong></a>is an open-source python framework for building web apps for Machine Learning and Data Science projects. We can instantly develop web apps and deploy them easily using Streamlit. Streamlit allows you to write an app the same way you write a python code. Streamlit makes it seamless to work on the interactive loop of coding and viewing results in the web app.</p><figure><img alt="visit: www.streamlit.io" src="https://cdn-images-1.medium.com/max/1024/1*GrFWkqRzGS-Pp4bqwqqdbQ.png" /></figure><h3><strong>Installing Streamlit</strong></h3><p>The first step is to install Streamlit via our terminal; you can go to the command prompt from windows, if you’re using a Windows PC for example, then you do pip install streamlit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*90yXQ_UXNNWNB-xE21Cw8w.png" /></figure><p>After installation, you want to open up your preferred text editor and then you import the streamlit module using: import streamlit as st</p><h3><strong>Code Explained:</strong></h3><p>In the next step, we will be creating a title heading for our form and a subheading:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*J8Lw87BBOKK6h-9FWyczpA.png" /></figure><h4><strong>Now we want to create our form fields:</strong></h4><p>Line 14 creates a function signature of st.form(key, clear_on_submit=False) Here, the key is the “form1” passed as an argument. “clear_on_submit” If True, all widgets inside the form will be reset to their default values after the user presses the Submit button. Defaults to False.</p><p>Line 15, 16 &amp; 17 creates an input field for the form. Line 18 creates a slider and sets the slider value automatically. you can therefore pass in two arguments to set the min and max values for your parameter, this can be viewed by entering the code st.write(age) on line 19.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*1jhnGzK6TfC0oY9k1RvlhQ.png" /></figure><p><strong>Finally, you can run your code from your terminal using:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*KT6fCaPuRCKhleLrSxKtmA.png" /></figure><p>streamlit run “nameofpythonfile.py” then press the Enter button. You can now view your Streamlit app in your browser via your Local URL or Network URL automatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*wUU6swyFdsljBraz7nIBzA.png" /></figure><p>You can check out the documentation of this form by entering: st.help(st.form)</p><p>Visit my GitHub page to get this code:</p><p><a href="https://github.com/DamolaChocolatebox">DamolaChocolatebox - Overview</a></p><p><em>More content at </em><a href="http://plainenglish.io/"><em>plainenglish.io</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de4a2981df0c" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/how-to-create-a-simple-webform-using-streamlit-de4a2981df0c">How to Create a Simple Webform Using Streamlit</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>