Build a Stunning Portfolio with Python : Zero😵 to Hero 🤩

Akansha Yadav shows how to build an interactive data portfolio with Python and Streamlit. You'll set up a folder structure, create a main app.py with sidebar navigation for About, Projects, and Contact sections, then add 4-5 showcase projects like customer segmentation and sentiment analysis as separate modules.
one data folder, then you have to create one images folder, and then you can also create—
did you know that the data professional who showcase their skills with the interactive portfolio have higher chances of getting their dream job? Hello everyone, welcome back to Coding Didi, your go-to channel for coding tips, tricks, and your career advices. Yes, did you know that the data professional who showcase their skills with the interactive portfolio have higher chances of getting their dream jobs? Yes, that's true. That is why I have created this video for you, because in this video I'm going to tell you a way how you can create one professional portfolio for yourself. This video is taking you you to a guide which is going to tell you how you have to create one using Python library, which is Streamlit library, a tool which is known for its simplicity, ability to create web apps, ability to create web apps with the minimal efforts. Yes, this is— everything is going to be based on Python script based because the data professional creates machine learning models, data professional creates dashboard, data professional creates prediction models, and anything it could be related to data. So having a good portfolio within the programming language is very, very important. This also showcase your interest and your creativity within the programming language as well. So this video is all about that. So without wasting time, let's get started. Also make sure to watch this video till in the end because I'm going to also share some tips that how you have to select the projects for your portfolio. Yes, selecting a project for your portfolio is another thing that you have to consider because every project is not for your portfolio. Maybe the project that you have created was just for the trial, or maybe the project that you have created is very beginner-friendly project. So you cannot add those kind of projects in your portfolio. So stay tuned till the end because I'm going to share the ways how you have to select. So let's get started. Now let's first understand why to build a data— because it is a well-organized data portfolio. Well-organized data portfolio is going to help you stand out in the terms of interviewers where thousands of applicants have applied for that role. It is also going to showcase your expertise, your creativity, your problem-solving ability. It is also going to provide tangible proof of your skills that you have beyond a simple resume, because in resume we have to add everything related to maybe the basic information that is sometimes like people used to add gender as well, which is in the resume, but in portfolio we are not going to talk about all of these things. We are just going to stay stick to ourself, our expertise, our creativity, and so on. Now let's talk about the library that we are going to use. We are going to use an open source Python library which is very, very famous for building web applications with the minimal efforts, as I said in the beginning. Minimal efforts means you just have to organize the stuff in the well manner, and also you can use ChatGPT for this purpose if you wanted to add more features in this. In the end of this video, I am also going to share some prompt for you. If you wanted to enhance this portfolio, which we will discuss in this video, you can enhance it with that prompt as well. So let's talk about how you have to set up the environment. To set up an environment, you have to first install your library. So we have been talking about Streamlit library, so obviously we need to install that. So the simple command which is used to install Streamlit library is pip install streamlit. This will install the Streamlit library. You can open your Visual Studio Code or PyCharm or any other IDE which you have been using for Python and you can install this simply over that. Then let's talk about folder. What you have to do is you have to create one folder that— let's suppose the project folder name is the project folder, and then you have to create two more folders under that. First is going to be your data folder, second is going to be the images folder. Data folder because data professionals create model, data professionals create prediction models, or maybe recommending system, or data professionals also create that. So they have to work with the data directly or indirectly, they have to work with data. So data folder is essential because because within this portfolio we will have a subheader in which we will mention the project names, and employer can directly move to those sections and can view your projects directly in your portfolio section because this is going to be web app based. Second is going to be the images folder. In images folder you can add a logo, you can add your profile picture, or any images or anything like social media icon also you can add in the images folder. Third thing is going to be your file. Two folders and one file. One file is going to be your main file. So in which you are going to write your Streamlit code. So in that main file, what you have to do is you can name it app.py, main.py, but make sure the extension is .py. You cannot use ipynb in this case, you have to use .py only. So this structure is going to make your code, your datasets, your images well organized, and your, your project is going to be scalable and easy to maintain. Now let's talk about your portfolio, that how your portfolio should look like. You have to structure your portfolio in well, good manner. So divide your portfolio in 3 subsections. First is going to be your About Me, second is going showcasing your project. Third is going to be contact information. Apart from these three sections, you need not to add anything in your portfolio to make it bulgy. No, just talk about these three things. Now one by one, let's talk what you have to add in. About Me is going to be all about your skills, your professional background, and your interest. Second, your showcasing project is going to be an interactive session where you have to add 4 to 5 projects. Those 4 to 5 projects should be the top. Then the contact information— you have to provide an easy way for the employers to connect with you. It can be via email, LinkedIn, or your phone number as well.
Okay, so I have already written this code. So my folder name is updated port, which is updated portfolio. So now in this you have to create one data folder, then you have to create one images folder, and then you can also create projects folder. And this is, this is the main file which we have just discussed, which is app.py. App.py is the main file. Now let's see the app.py and then we will move on to the further section. So basically our portfolio should look something like there should be one navigation bar on our left-hand side, on in the right-hand side there should be a complete area where the data has to be displayed. Now let's see what are the codes that you have to write. You have to import the Streamlit library. From the Streamlit library, I'm giving it a title. You can give it anything. If you wanted to name it, let's say menu, so you can just replace the navigation with the menu simply. Then what do I want is I wanted to provide some options. So I want 3 options, like under go to there should be 3 options: about me, projects, and contact. As we have discussed, there should be 3 different sections. So this is the Streamlit library short form name: sidebar and select box. So this is how the options will come up to us. Now user will, or employer will Select one, which is About Me. Then I am saying Streamlit title should be About Me, and then you can write down whatever you wanted to write about yourself. So you can say that my name is Akansha Yadav. Hi, I am Akansha Yadav, a data enthusiast passionate about solving real-world problems through analytics or machine learning. Then the second option is Project. Let's say the project— so in portfolio there should be 4 to 5 projects that you need to add. So what I have done is under the Project folder you have to create 5 different files: Project 1, Project 2, Project 3, Project 4, and Project 5. Now these 5 files are going to be used as a module. So I am going to use these files as a module, and I'm going to call all these files in the app.py whenever they are going to select. So I am creating for the select box, which is going to be select a project which you wanted to view. Customer— I'm just mentioning some names, you can replace it with your project name. So customer segmentation, sentiment analysis, sales forecasting, COVID-19 analysis, resume keywords. So these are the 5 projects. Now I have added in this. Now what I am saying is if project is equal to customer segmentation, then I am calling that project, and I'm calling that run function. So if I will show you one of the file which is project 1. This consists of word cloud library, Matplotlib, whichever library you wanted to use in your project, you have to add it over there. And then I have written everything within the def, and I am saying that it should display the header, the sentiment analysis of tweets. And then I'm writing analyze Twitter data to classify sentiments on the basis of these, and this is the text that I am providing. And then the word cloud will be generated to showcase. You can display the final result or final analysis of your project to make it to the point, to make it short, and to make it simple. Okay, now over here I have written from import run. Why we are importing run? Because in this file I have created a function called run, which is why I am calling it over here. So I am making it consistent throughout my all projects. So in Project 2, Project 3, Project 4, and Project 5, you have to do the same thing. First you have to import all the libraries required, then you have to use the run function to make it consistent, so that whenever next time you wanted to make changes in any of these files, you can make it. Now let's say you are creating something based on data. So obviously you need to add some data in your project. So go to the data folder. In this data folder you have to create certain files. So let's say I'm saying data1.csv. So you can add, you can also copy paste the data over here, or you can just, uh, within the same folder also you can cut and paste the data directly in the Streamlit folder which you have created. And then you can create data2.csv and so on. You can keep on adding the datasets over here. Now these are the 5 projects that I wanted to add. After 5 projects, I am calling my run function again. First I'm importing my run function, then I'm calling my run function to run. Then comes the last one, which is the contact form. You can also separately create one contact.py file. If not, then you can directly write it like it is— this is the contact form, and from contact form I'm calling the text input, text area, and submit button. And then if submitted, it will display thank you for reaching out, the name of that person, whatever the name will be added over here, and then I will get back to you shortly. Now I will show you how it will work in this. Another thing to note over here is suppose you wanted to add a profile picture or something within this, so you you can write it over here directly. st is the name, and then you can add whatever you wanted to add. You can see, you can add audios, you can add area chart, you can use any kind of chart over here. Even the cache data also you can add it over here. Anything related to, uh, the, uh, display thing, you can. So say I wanted to add an image, so st.image, and then open the bracket, then enter the path of that particular image. Simple. And if you want any caption to be there, then you can continue writing the caption as well. So caption is equal to, let's say, hello. So if you have any image, you can write it like this, and you can continue. So image will also be added in your portfolio. Now see how to run it. To run it, you have to simply go to this terminal. Go to the terminal, then open a new terminal. Once you will open the new terminal, you have to write down streamlit run app.py. Streamlit run app.py will open in your Chrome or your Microsoft Edge. It totally depends upon your system setting which one is your by default server. So let me just show you that. So over here you can see this is your About Me page where I haven't added much, but I have just added a single line. So that is why we are getting the single line only. Then And there is a dropdown, Project, Contact. So let's say I'm saying Project. So these are the projects already added for now. And if you wanted to make any changes in any of these projects, you can simply go and change it. And here comes an Annotate button as well. If you wanted to annotate anywhere, you can annotate to showcase in the interview as well. So that's how simple you can create the Streamlit portfolio.
Found this tutorial helpful or anyhow it is important to you, then don't forget to like, share, and subscribe if you like this video and have any questions or suggestions for the further videos or this video, don't forget to comment down.










