Python Data Explorer (@PythonTurkCom) header
Python Data Explorer (@PythonTurkCom) profile picture

🐍 Python | 📊 Data Analysis | 📈 SQL and Excel | Data Visualization | Machine Learning (ML) | Linux | PythonTurkCom

Joined September 2023
Photo by Python Data Explorer (@PythonTurkCom)Photo by Python Data Explorer (@PythonTurkCom)Photo by Python Data Explorer (@PythonTurkCom)Photo by Python Data Explorer (@PythonTurkCom)Photo by Python Data Explorer (@PythonTurkCom)Photo by Python Data Explorer (@PythonTurkCom)Photo by Python Data Explorer (@PythonTurkCom)Photo by Python Data Explorer (@PythonTurkCom)Photo by Python Data Explorer (@PythonTurkCom)Photo by Python Data Explorer (@PythonTurkCom)
NumPy Cheat Sheet Beginner or pro, this cheat sheet is a time-saving essential in your toolbox. 🚀💡 #programminghelp #DataAnalysis #DataScientists #NumPyCheatSheet
1
2
6
956
🐧 Want to know more about your Linux system? Here are some handy commands to gather information: uname -a: Kernel and system info lsb_release -a: Distribution details df -h: Disk space usage free -m: Memory usage ifconfig: Network info #Linux #LinuxTips #SysAdmin
2
2
12
879
- Using the 'update' Method (All Python Versions): The 'update' method has been available since Python 2.x and remains a consistent way to merge dictionaries.
1
212
- Using the "**" Operator (Python 3.5+): The "**" operator allows you to merge dictionaries by unpacking their contents, available from Python 3.5 onward.
1
1
289
- Using the "|" Operator (Python 3.9+): The "|" operator is a concise way to combine dictionaries, introduced in Python 3.9. Output: Merged Dictionary (Using update Method): {'Name': 'John', 'Surname': 'Doe', 'Salary': 60000, 'Job': 'Engineer', 'Age': 30}
1
32
💡 Daily Tips : Merging Dictionaries in Python In Python, you can merge two dictionaries using different methods: - Using the "|" Operator (Python 3.9+): - Using the "**" Operator (Python 3.5+): - Using the 'update' Method (All Python Versions): #Python #MachineLearning
1
4
506
Are you a data analyst ? SQL subqueries help optimize your database queries when working with large datasets. #Sql #Python #DataAnalysis #BigData github.com/pythonturk2024/Co…
1
2
3
293
def display_info(**info): for key, value in info.items(): print(f"{key}: {value}") display_info(name="John", surname="Doe", age=30, profession="Engineer") # Output: # name: John # surname: Doe # age: 30 # profession: Engineer
2
182
**kwargs **kwargs is used to pass an unlimited number of key-value pairs to a function. This is useful for passing values related to optional keys to the function. **kwargs is used inside the function as a dictionary.
1
1
221
def add(*numbers): result = 0 for number in numbers: result += number return result print(add(1, 2, 3, 4)) print(add(1, 2, 3, 4, 5)) print(add(1, 2, 3, 4, 5, 6)) # Output: # 10 # 15 # 21
1
27
*args (Non-Keyword Arguments) **kwargs (Keyword Arguments) - *args *args allows a function to accept an unlimited number of arguments. This allows the function to run without predetermining how many arguments it will take. *args is used inside the function as a tuple.
1
22
So what happens if we send more than 2 values this way? The program gives an error. Python allows us to pass a variable number of parameters to a function using special symbols. There are 2 unique keywords that allow a function to accept a variable-length argument:
1
25
💡 Daily Tips: *args and **kwargs in Python When writing a function, we often need to pass values to the function. These values are called function arguments. def add(x, y): return x + y print(add(2, 3)) # 5 #Python #dailytips #MachineLearning #DataAnalytics
1
1
5
562
The most requested skill in Data Science (DS), Machine Learning (ML) and MLOPS job postings is "Communication". jobs-in-data.com/blog/machin… #DataScientists #MachineLearning #Python
2
356
Python string formatting comes in different flavors! Learn to format your text with format(), f-strings, and the % operator. 🐍✨ #Python #CodingTips github.com/pythonturk2024/Co…
2
327
Must-know information for beginners. Learn the fundamental statistical calculations for data analysis. 📊💡 #DataAnalysis #Statistics #Python #Pandas github.com/pythonturk2024/Co…
4
391
- Listing Usernames cut -d: -f1 /etc/passwd Splits each line in the /etc/passwd file with a ":" separator and displays the first field of each line, the username.
1
244
The -r option removes the user's home directory and all associated files, ensuring that the user account is entirely deleted from the system.
1
225
- userdel The userdel command is used to delete existing user accounts in Linux and Unix-like operating systems. It allows you to permanently remove user accounts. Example: sudo userdel -r newuser
1
33
- usermod The usermod command is used to edit existing user accounts in Linux and Unix-like operating systems. Example: sudo usermod -d /home/newhome newuser This command changes the home directory of the user "newuser" to "/home/newhome"
1
13