Learning Python basics for data analytics

While exploring the Python step-by-step 🐍 I learned how powerful yet simple this language is🚀 Here’s what I’ve covered till now.. 1️⃣𝐕𝐚𝐫𝐢𝐚𝐛𝐥𝐞𝐬: 1. Variables are containers that store data in a Python program. 2. They can store different types of data such as string, integer, float, and boolean. 𝐒𝐨𝐦𝐞 𝐤𝐞𝐲 𝐫𝐮𝐥𝐞𝐬 𝐈 𝐥𝐞𝐚𝐫𝐧𝐞𝐝: 1. Variable names must start with a letter or underscore (_). 2. They can’t contain spaces or special characters like @, #, $, %, ^. 3. Reserved words (like def, True, etc.) should not be used as variable names. 2️⃣𝐍𝐮𝐦𝐛𝐞𝐫𝐬: 1. Integers store whole numbers, while floats store numbers with decimal points (like 57.23). 2. The type() function helps identify the data type of a variable. 3. The / operator performs normal division, while // gives the integer part of the result. 3️⃣𝐒𝐭𝐫𝐢𝐧𝐠𝐬: Strings can be sliced, combined, and formatted easily using f-strings. 𝐄𝐱𝐚𝐦𝐩𝐥𝐞: name = "Mohan Das" age = 30 𝙥𝙧𝙞𝙣𝙩(f"{name} is {age} years old") output: Mohan Das is 30 years old. Some useful string functions I explored: 1. 𝐫𝐞𝐩𝐥𝐚𝐜𝐞() → Replaces part of a string with another. 2. 𝐮𝐩𝐩𝐞𝐫() → Converts all letters to uppercase. 3. 𝐬𝐩𝐥𝐢𝐭() → Splits a string into a list of words. 4. 𝐬𝐭𝐫𝐢𝐩() → Removes extra spaces from the start and end of a string. 💻𝐓𝐨𝐨𝐥𝐬 𝐈’𝐦 𝐔𝐬𝐢𝐧𝐠: I also got to know that instead of using the command prompt, I can work in Git Bash and use Jupyter Notebook to practice Python interactively which makes learning even more fun! Learning Python step-by-step is helping me build a solid foundation for data analytics. Every small concept feels like a step closer to writing efficient and clean code ! #Python #DataAnalytics #Coding #JupyterNotebook #GitBash #Codebasics #SQL #powerbi

  • graphical user interface, text, application

To view or add a comment, sign in

Explore content categories