Gihan  Lakshan

Gihan Lakshan


How to Read, Parse, and Write CSV Files with Python

In this Python Programming Tutorial, we will be learning how to work with csv files using the csv module. We will learn how to read, parse, and write to csv files. CSV stands for “Comma-Separated Values”. It is a common format for storing information. Knowing how to read, parse, and write this information to files will open the door to working with a lot of data throughout the world. Let’s get started.

The code from this video can be found at:



What is GEEK

Buddha Community

How to Read, Parse, and Write CSV Files with Python
Ray  Patel

Ray Patel


top 30 Python Tips and Tricks for Beginners

Welcome to my Blog , In this article, you are going to learn the top 10 python tips and tricks.

1) swap two numbers.

2) Reversing a string in Python.

3) Create a single string from all the elements in list.

4) Chaining Of Comparison Operators.

5) Print The File Path Of Imported Modules.

6) Return Multiple Values From Functions.

7) Find The Most Frequent Value In A List.

8) Check The Memory Usage Of An Object.

#python #python hacks tricks #python learning tips #python programming tricks #python tips #python tips and tricks #python tips and tricks advanced #python tips and tricks for beginners #python tips tricks and techniques #python tutorial #tips and tricks in python #tips to learn python #top 30 python tips and tricks for beginners

Kennith  Blick

Kennith Blick


Reading and Writing to Files in Python - Intermediate Python Tutorial #2

In this Python tutorial, we will learn how to deal with text files in Python using the built-in open function. You will understand how to use the most important modes: read, write and append.
That’s not all! We will discuss about file parsing and touch important string methods used for that such as: strip( ) and split( ). Finally we wrap up with a parsing file exercise to practice the new concepts. After that video you will be confident to deal with text files which is a very important skill to have as a programmer.

Playlist: Intermediate Python Tutorials | Video #2
Access the codes here:

00:00 - Summary of the video
00:17 - Types of files
00:43 - How to open a file
01:17 - File modes
02:15 - How to read data from a file
03:00 - with statement
04:10 - readlines( ) method
05:05 - String: strip( ) method
06:22 - How to iterate over a file line by lin
08:47 - How to write data to a file
11:43 - How to append data to a file
12:37 - Exercise: Parsing a text file
16:14 - Converting data types
17:00 - Next video announcement

Photo by Mario Ho on Unsplash

#reading #writing #python #intermediate python tutorial #reading and writing to files in python

Ray  Patel

Ray Patel


Lambda, Map, Filter functions in python

Welcome to my Blog, In this article, we will learn python lambda function, Map function, and filter function.

Lambda function in python: Lambda is a one line anonymous function and lambda takes any number of arguments but can only have one expression and python lambda syntax is

Syntax: x = lambda arguments : expression

Now i will show you some python lambda function examples:

#python #anonymous function python #filter function in python #lambda #lambda python 3 #map python #python filter #python filter lambda #python lambda #python lambda examples #python map

How to read/write CSV files in Python » grokonez

How to read/write CSV files in Python

In this tutorial, we’re gonna look at way to use csv module to read, write CSV files in Python program.

CSV files

CSV stands for 'comma-separated values'. CSV file is a spreadsheet stored as plain-text file. Each line in a CSV file represents a row, and commas separate cells in the row.

For example:

Python String methods,Python,12/27/2018
How to iterate over a List in Java,Java,12/21/2018
Kotlin List functions,Kotlin,12/19/2018

Instead of commas, cells could be separated with tab characters:

Title	Tags	Date
Python String methods	python, string	12/27/2018
How to iterate over a List in Python	python, list	12/21/2018
Python List functions	python, list	12/19/2018

CSV file is simple than Excel spreadsheet because it doesn’t have:

  • types, everything is just a string
  • font size or color
  • multiple worksheets
  • cell widths and heights
  • merge cells
  • images or charts

Read CSV file in Python

You can follow these steps to read data from a CSV file: - import csv module - open CSV file using open() function - create a Reader object that lets you iterate over rows - access values in the Reader object by: + convert it to a plain Python list using list() function + use for-loop (avoid loading the entire file into memory at once)

# cells are separated with commas
>>> import csv
>>> gkzFile = open('grokonez.csv')
>>> csvReader = csv.reader(gkzFile)
>>> gkzTuts = list(csvReader)
>>> gkzTuts
[['Title', 'Category', 'Date'], ['Python String methods', 'Python', '12/27/2018'], ['How to iterate over a List in Java', 'Java', '12/21/2018'], ['Kotlin List functions', 'Kotlin', '12/19/2018']]
>>> gkzTuts[0][0] # data[row][col]
>>> gkzTuts[0][1]
>>> gkzTuts[0][2]
>>> gkzTuts[2][0]
'How to iterate over a List in Java'
>>> gkzTuts[2][1]
>>> gkzTuts[2][2]

cells are separated with ‘tab’ characters

gkzFile = open(‘grokonez.csv’)
csvReader = csv.reader(gkzFile, delimiter=‘\t’)
gkzTuts = list(csvReader)
[[‘Title’, ‘Tags’, ‘Date’], [‘Python String methods’, ‘python, string’, ‘12/27/2018’], [‘How to iterate over a List in Python’, ‘python, list’, ‘12/21/2018’], [‘Python List functions’, ‘python, list’, ‘12/19/2018’]]
‘How to iterate over a List in Python’
‘python, list’

Remember that we can loop over Reader object only once.
To reread the CSV file by for-loop, we must create Reader object again.

More at:

How to read/write CSV files in Python

#python #csv #read #write

Shardul Bhatt

Shardul Bhatt


Why use Python for Software Development

No programming language is pretty much as diverse as Python. It enables building cutting edge applications effortlessly. Developers are as yet investigating the full capability of end-to-end Python development services in various areas. 

By areas, we mean FinTech, HealthTech, InsureTech, Cybersecurity, and that's just the beginning. These are New Economy areas, and Python has the ability to serve every one of them. The vast majority of them require massive computational abilities. Python's code is dynamic and powerful - equipped for taking care of the heavy traffic and substantial algorithmic capacities. 

Programming advancement is multidimensional today. Endeavor programming requires an intelligent application with AI and ML capacities. Shopper based applications require information examination to convey a superior client experience. Netflix, Trello, and Amazon are genuine instances of such applications. Python assists with building them effortlessly. 

5 Reasons to Utilize Python for Programming Web Apps 

Python can do such numerous things that developers can't discover enough reasons to admire it. Python application development isn't restricted to web and enterprise applications. It is exceptionally adaptable and superb for a wide range of uses.

Robust frameworks 

Python is known for its tools and frameworks. There's a structure for everything. Django is helpful for building web applications, venture applications, logical applications, and mathematical processing. Flask is another web improvement framework with no conditions. 

Web2Py, CherryPy, and Falcon offer incredible capabilities to customize Python development services. A large portion of them are open-source frameworks that allow quick turn of events. 

Simple to read and compose 

Python has an improved sentence structure - one that is like the English language. New engineers for Python can undoubtedly understand where they stand in the development process. The simplicity of composing allows quick application building. 

The motivation behind building Python, as said by its maker Guido Van Rossum, was to empower even beginner engineers to comprehend the programming language. The simple coding likewise permits developers to roll out speedy improvements without getting confused by pointless subtleties. 

Utilized by the best 

Alright - Python isn't simply one more programming language. It should have something, which is the reason the business giants use it. Furthermore, that too for different purposes. Developers at Google use Python to assemble framework organization systems, parallel information pusher, code audit, testing and QA, and substantially more. Netflix utilizes Python web development services for its recommendation algorithm and media player. 

Massive community support 

Python has a steadily developing community that offers enormous help. From amateurs to specialists, there's everybody. There are a lot of instructional exercises, documentation, and guides accessible for Python web development solutions. 

Today, numerous universities start with Python, adding to the quantity of individuals in the community. Frequently, Python designers team up on various tasks and help each other with algorithmic, utilitarian, and application critical thinking. 

Progressive applications 

Python is the greatest supporter of data science, Machine Learning, and Artificial Intelligence at any enterprise software development company. Its utilization cases in cutting edge applications are the most compelling motivation for its prosperity. Python is the second most well known tool after R for data analytics.

The simplicity of getting sorted out, overseeing, and visualizing information through unique libraries makes it ideal for data based applications. TensorFlow for neural networks and OpenCV for computer vision are two of Python's most well known use cases for Machine learning applications.


Thinking about the advances in programming and innovation, Python is a YES for an assorted scope of utilizations. Game development, web application development services, GUI advancement, ML and AI improvement, Enterprise and customer applications - every one of them uses Python to its full potential. 

The disadvantages of Python web improvement arrangements are regularly disregarded by developers and organizations because of the advantages it gives. They focus on quality over speed and performance over blunders. That is the reason it's a good idea to utilize Python for building the applications of the future.

#python development services #python development company #python app development #python development #python in web development #python software development