Epython Lab
6.78K subscribers
633 photos
30 videos
103 files
1.16K links
Welcome to Epython Lab, where you can get resources to learn, one-on-one trainings on machine learning, business analytics, and Python, and solutions for business problems.

Buy ads: https://telega.io/c/epythonlab
Download Telegram
The death rate of Somalia and Sudan is high when we compare others. Ethiopia is in good status. Almost 50% are recovered in #Djiboti
#QuarantineYourself #LearnDataScience
#Python is a multi-paradigm, dynamically typed, multipurpose programming language, designed to be quick (to learn, to use, and to understand), and to enforce a clean and uniform syntax. Please note that Python 2 is officially out of support as of January 1, 2020. Therefore automatically shift yourself from Python-2 to the latest and most improved version of python [python-3.x] .

#QuarantineYourself #LearnPython #LearnDataScience
👍1
Reading a File using Python

Computers use file systems to store and retrieve data. Each file is an individual container of related information. If you’ve ever saved a document, downloaded a song, or even sent an email you’ve created a file on some computer somewhere. Even script.py, the Python program you’re editing in the learning environment, is a file.
So, how do we interact with files using Python?
Let’s say we had a file called hello_python.txt with these contents:

Python is a powerful tool for Data Ananlysis. So, stay at home and learn python for future Data Science.

We could read that file like this:

script.py

with open('hello_python.txt') as python_file:
python_contents = python_file.read()
print(python_contents)

This
opens a file object called python_file and creates a new indented block where you can read the contents of the opened file. We then read the contents of the file python_file using python_file.read() and save the resulting string into the variable python_contents. Then we print python_contents, which outputs the statement written in the above!.

#QuarantineYourself #LearnPython #LearnDataScience
Python is a general-purpose programming language. It can do almost all of what other languages can do with comparable, or faster, speed. It is often chosen by Data Analysts and Data Scientists for prototyping, visualization, and execution of data analyses on datasets.

There’s an important question here. Plenty of other programming languages, like R, can be useful in the field of data science. Why are so many people choosing Python?

One major factor is Python’s versatility. There are over 125,000 third-party Python libraries. These libraries make Python more useful for specific purposes, from the traditional (e.g. web development, text processing) to the cutting edge (e.g. AI and machine learning). For example, a biologist might use the Biopython library to aid their work in genetic sequencing.

Additionally, Python has become a go-to language for data analysis. With data-focused libraries like pandas, NumPy, and Matplotlib, anyone familiar with Python’s syntax and rules can use it as a powerful tool to process, manipulate, and visualize data.

#FaceMask #KeepDistancing #LearnPython #LearnDataScience

Join @python4fds for more information
👍1
Writing a File using Python

In the previous post we have seen that how to open and read a file using python script. Today, I have posting about how to write a file or create your own file using the script.

Reading a file is all well and good, but what if we want to create a file of our own? With Python we can do just that. It turns out that our open() function that we’re using to open a file to read needs another argument to open a file to write to.

script.py

with open('generated_file.txt', 'w') as gen_file:
gen_file.write("I love python!")

Here we pass the argument 'w' to open() **in order to indicate to open the file in write-mode. The default argument is 'r' and passing 'r' to **open() opens the file in read-mode as we’ve been doing.

This code creates a new file in the same folder as script.py and gives it the text What an incredible file!. It’s important to note that if there is already a file called generated_file.txt it will completely overwrite that file, erasing whatever its contents were before.

#QuarantineYourself #LearnPython #LearnDataScience
What Is a CSV File?

Text files aren’t the only thing that Python can read, but they’re the only thing that we don’t need any additional parsing library to understand. CSV files are an example of a text file that impose a structure to their data. CSV stands for Comma-Separated Values and CSV files are usually the way that data from spreadsheet software (like Microsoft Excel or Google Sheets) is exported into a portable format. A spreadsheet that looks like the following
Name Username Email
Asibeh Tenager asibeh asibeh@yahoo.com
Asibeh Tenager asibeh asibeh@yahoo.com




In a CSV file that same exact data would be rendered like this:

users.csv

Name,Username,Email, Asibeh Tenager, asibeh,
asibeh@yahoo.com

Notice that the first row of the CSV file doesn’t actually represent any data, just the labels of the data that’s present in the rest of the file. The rest of the rows of the file are the same as the rows in the spreadsheet software, just instead of being separated into different cells they’re separated by… well I suppose it’s fair to say they’re separated by commas.


#FaceMask #KeepDistancing #LearnPython #LearnDatascience
Forwarded from Epython Lab (Asibeh Tenager)
You can conclude the result based on the graph shows

#QuarantineYourself #LearnDataScience #Bioinformatics #Python #Pandas #Matplotlib
👍1
Forwarded from Epython Lab (Asibeh Tenager)
#Assignment

Guess The Number

Write a programme where the computer randomly generates a number between 0 and 20. The user needs to guess what the number is. If the user guesses wrong, tell them their guess is either too high, or too low. This will get you started with the random library if you haven't already used it.

Post your solution in the comment box

#LearnDataScience #LearnPython #StayHome
👍2
Forwarded from Epython Lab (Asibeh Tenager) via @like
Python is a general-purpose programming language. It can do almost all of what other languages can do with comparable, or faster, speed. It is often chosen by Data Analysts and Data Scientists for prototyping, visualization, and execution of data analyses on datasets.

There’s an important question here. Plenty of other programming languages, like R, can be useful in the field of data science. Why are so many people choosing Python?

One major factor is Python’s versatility. There are over 125,000 third-party Python libraries. These libraries make Python more useful for specific purposes, from the traditional (e.g. web development, text processing) to the cutting edge (e.g. AI and machine learning). For example, a biologist might use the Biopython library to aid their work in genetic sequencing.

Additionally, Python has become a go-to language for data analysis. With data-focused libraries like pandas, NumPy, and Matplotlib, anyone familiar with Python’s syntax and rules can use it as a powerful tool to process, manipulate, and visualize data.

#FaceMask #KeepDistancing #LearnPython #LearnDataScience

Join @python4fds for more information
3👍3