
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 10476 Articles for Python

773 Views
In this article, we will show you how to find the frequency (number of times the word occurs) of a specific word in a cell of a given excel file using python. Assume we have taken an excel file with the name TutorialsPoint.xlsx containing some random data. We will return the frequency of a given word in a cell of a given excel file. sampleTutorialsPoint.xlsx Player Name Age Type Country Team Runs Wickets Virat Kohli Batsman India Royal Challengers Bangalore 20 34 Batsman India Sun Risers Hyderabad 333 140 ... Read More

3K+ Views
In this article, we will show you how to find the index of a first empty row of a given excel file using python. Assume we have taken an excel file with the name demoTutorialsPoint.xlsx containing some random data with some empty rows. We will return the index of the first empty row in an excel worksheet. sampleTutorialsPoint.xlsx Player Name Age Type Country Team Runs Wickets Virat Kohli 33 Batsman India Royal Challengers Bangalore 6300 20 Bhuvaneshwar Kumar 34 Batsman India Sun Risers Hyderabad 333 140 Mahendra Singh Dhoni 39 Batsman India ... Read More

4K+ Views
In this article, we will show you how to copy only odd lines of a text file to another text file using python. Assume we have taken a text file with the name TextFile.txt consisting of some random text. We need to copy just all the odd lines of a text file into another and print them. TextFile.txt Good Morning This is the Tutorials Point sample File Consisting of Specific source codes in Python, Seaborn, Scala Summary and Explanation Welcome everyone Learn with a joy Algorithm (Steps) Following are the Algorithm/steps to be followed to perform the desired task ... Read More

29K+ Views
In this article, we will show you how to convert an excel file to the CSV File (Comma Separated Values) using python. Assume we have taken an excel file with the name sampleTutorialsPoint.xlsx containing some random text. We will return a CSV File after converting the given excel file into a CSV file. sampleTutorialsPoint.xlsx Player Name Age Type Country Team Runs Wickets Virat Kohli 33 Batsman India Royal Challengers Bangalore 6300 20 Bhuvaneshwar Kumar 34 Batsman India Sun Risers Hyderabad 333 140 Mahendra Singh Dhoni 39 Batsman India Chennai Super Kings 4500 ... Read More

19K+ Views
In this article, we will show you how to convert a CSV File (Comma Separated Values) to an excel file using the pandas module in python. Assume we have taken an excel file with the name ExampleCsvFile.csv containing some random text. We will return a CSV File after converting the given excel file into a CSV file. ExampleCsvFile.csv Player Name Age Type Country Team Runs Wickets Virat Kohli 33 Batsman India Royal Challengers Bangalore 6300 20 Bhuvneshwar Kumar34 Batsman India Sun Risers Hyderabad 333 140 Mahendra Singh Dhoni 39 Batsman India Chennai ... Read More

4K+ Views
In this article, we will show you how to get a line number in which the given word is present from a text file using python. Assume we have taken a text file with the name TextFile.txt consisting of some random text. We will return the line numbers in which the given word is present from a text file TextFile.txt Good Morning TutorialsPoint This is TutorialsPoint sample File Consisting of Specific source codes in Python, Seaborn, Scala Summary and Explanation Welcome TutorialsPoint Learn with a joy Algorithm (Steps) Following are the Algorithm/steps to be followed to perform the desired ... Read More

4K+ Views
In this article, we will show you how to write the data present in the list into a text file using python. Assume we have taken a list and written all the elements of the list into a text file say "ListDataFile.txt" which has the following data after writing into it. Let’s say that we have following list in a text file − inputList = ['This', 'is', 'a', 'TutorialsPoint', 'sample', 'file'] we will get the following result of the above string with this program − This is a TutorialsPoint sample file Algorithm (Steps) Following are the Algorithm/steps to be ... Read More

5K+ Views
In this article, we will show you how to remove the newline character() from a given text file using python. Assume we have taken a text file with the name TextFile.txt consisting of some random text. We will remove the newline character() from a given text file. TextFile.txt Good Morning TutorialsPoint This is TutorialsPoint sample File Consisting of Specific source codes in Python, Seaborn, Scala Summary and Explanation Welcome TutorialsPoint Learn with a joy Algorithm (Steps) Following are the Algorithm/steps to be followed to perform the desired task − Create a variable to store the path of the ... Read More

3K+ Views
In this article, we will show you how to print all the shortest words from a given text file using python. The shortest words are the words which are having the same length as the shortest word (minimum length) in a text file. Assume we have taken a text file with the name TextFile.txt consisting of some random text. We will return all the shortest words from a given text file. TextFile.txt Good Morning Tutorials Point This is the Tutorials Point sample File Consisting of Specific abbreviated source codes in Python Seaborn Scala Imagination Summary and Explanation Welcome user Learn ... Read More

10K+ Views
In Python, the definition of generators is accomplished with the help of the yield statement. Therefore, before we dive into the specifics of what yield actually does, it's important that you get an overview of generators. If you have exposure to Python, then there is a good probability that you have previously worked with Python generators. Generators play an important function in Python. In Python, iterators can be generated using generators, however this process takes a somewhat different form. Python Generators are functions that may be dynamically paused and resumed and create a succession of outcomes. They can also be ... Read More