Python for Data Analysts
48.1K subscribers
504 photos
64 files
320 links
Find top Python resources from global universities, cool projects, and learning materials for data analytics.

For promotions: @coderfun

Useful links: heylink.me/DataAnalytics
Download Telegram
Python Complete Notion Notes with 5 Practical Projects
👇👇
https://dataanalytics.mini.site/products/bf8c9a6b-8ebc-4480-bd62-63a403617718

Kept price just Rs 29 so that everyone can afford it 😄❤️
👍5
COMMON TERMINOLOGIES IN PYTHON - PART 1

Have you ever gotten into a discussion with a programmer before? Did you find some of the Terminologies mentioned strange or you didn't fully understand them?

In this series, we would be looking at the common Terminologies in python.

It is important to know these Terminologies to be able to professionally/properly explain your codes to people and/or to be able to understand what people say in an instant when these codes are mentioned. Below are a few:

IDLE (Integrated Development and Learning Environment) - this is an environment that allows you to easily write Python code. IDLE can be used to execute a single statements and create, modify, and execute Python scripts.

Python Shell - This is the interactive environment that allows you to type in python code and execute them immediately

System Python - This is the version of python that comes with your operating system

Prompt - usually represented by the symbol ">>>" and it simply means that python is waiting for you to give it some instructions

REPL (Read-Evaluate-Print-Loop) - this refers to the sequence of events in your interactive window in form of a loop (python reads the code inputted>the code is evaluated>output is printed)

Argument - this is a value that is passed to a function when called eg print("Hello World")... "Hello World" is the argument that is being passed.

Function - this is a code that takes some input, known as arguments, processes that input and produces an output called a return value. E.g print("Hello World")... print is the function

Return Value - this is the value that a function returns to the calling script or function when it completes its task (in other words, Output). E.g.
>>> print("Hello World")
Hello World
Where Hello World is your return value.

Note: A return value can be any of these variable types: handle, integer, object, or string

Script - This is a file where you store your python code in a text file and execute all of the code with a single command

Script files - this is a file containing a group of python scripts
👍51
Frequently asked Python practice questions and answers in Data Analyst Interview:
1.Temperature Conversion: Write a program that converts a given temperature from Celsius to Fahrenheit or from Fahrenheit to Celsius based on user input.
temp = float(input('Enter the temperature: '))
unit = input('Enter the unit (C/F): ').upper()
if unit == 'C':
converted = (temp * 9/5) + 32
print(f'Temperature in Fahrenheit: {converted}')
elif unit == 'F':
converted = (temp - 32) * 5/9
print(f'Temperature in Celsius: {converted}')
else:
print('Invalid unit')

2.Multiplication Table: Write a program that prints the multiplication table of a given number using a while loop.
num = int(input('Enter a number: '))
i = 1
while i <= 10:
print(f'{num} x {i} = {num * i}')
i += 1

3.Greatest of Three Numbers: Write a program that takes three numbers as input and prints the greatest of the three.
num1 = float(input('Enter first number: '))
num2 = float(input('Enter second number: '))
num3 = float(input('Enter third number: '))
if num1 >= num2 and num1 >= num3:
print(f'The greatest number is {num1}')
elif num2 >= num1 and num2 >= num3:
print(f'The greatest number is {num2}')
else:
print(f'The greatest number is {num3}')

4.Sum of Even Numbers: Write a program that calculates the sum of all even numbers between 1 and a given number using a while loop.
num = int(input('Enter a number: '))
total = 0
i = 2
while i <= num:
total += i
i += 2
print(f'The sum of even numbers up to {num} is {total}')

5.Check Armstrong Number: Write a program that checks if a given number is an Armstrong number.
num = int(input('Enter a number: '))
sum_of_digits = 0
original_num = num
while num > 0:
digit = num % 10
sum_of_digits += digit ** 3
num //= 10
if sum_of_digits == original_num:
print(f'{original_num} is an Armstrong number')
else:
print(f'{original_num} is not an Armstrong number')

6.Reverse a Number: Write a program that reverses the digits of a given number using a while loop.
num = int(input('Enter a number: '))
reversed_num = 0
while num > 0:
digit = num % 10
reversed_num = reversed_num * 10 + digit
num //= 10
print(f'The reversed number is {reversed_num}')

7.Count Vowels and Consonants: Write a program that counts the number of vowels and consonants in a given string.
string = input('Enter a string: ').lower()
vowels = 'aeiou'
vowel_count = 0
consonant_count = 0
for char in string:
if char.isalpha():
if char in vowels:
vowel_count += 1
else:
consonant_count += 1
print(f'Number of vowels: {vowel_count}')
print(f'Number of consonants: {consonant_count}')

Python Interview Q&A: https://topmate.io/coding/898340

Like for more ❤️

ENJOY LEARNING 👍👍
👍31
10 Pandas (python) functions
I used the most as a Data Analyst👇

1/ read_csv(): Reads data from a CSV file.
2/ head(): Displays the first few rows of a df.
3/ info(): Provides metadata about the df.
4/ describe(): Offers statistics.
5/ groupby(): Groups data.
6/ merge(): Combines dfs using a common column.
7/ drop_duplicates(): Removes duplicate rows.
8/ isna(): Checks for missing values.
9/ drop(): Removes specified rows or columns.
10/ apply(): Applies a custom function to df.

Join for more: t.iss.one/pythonanalyst
👍10
Python for Data Analysis: Roadmap
👍8
You don't need to know everything about every data tool. Focus on what will help land you your job.

For Excel:
- IFS (all variations)
- XLOOKUP
- IMPORTRANGE (in GSheets)
- Pivot Tables
- Dynamic functions like TODAY()

For SQL:
- Sum
- Group By
- Window Functions
- CTEs
- Joins

For Tableau:
- Calculated Columns
- Sets
- Groups
- Formatting

For Power BI:
- Power Query for data transformation
- DAX (Data Analysis Expressions) for creating custom calculations
- Relationships between tables
- Creating interactive and dynamic dashboards
- Utilizing slicers and filters effectively

I have created 100-Day Roadmap & Resources for Data Analyst 👇👇
https://whatsapp.com/channel/0029VaGgzAk72WTmQFERKh02

Hope it helps :)
6👍4
DSA in Python
👍42