Skip to main content


Showing posts from 2017
This post covers python topics such as Reading files, Numpy ,Pandas, Matplotlib, Generators and Iterators.

1) Reading Files:We will start with very basic file which is a iris dataset. You can download the file from here
We are going to use to methods for reading files at once here:
1) Read
2) Readlines

Here is the program to read the file:

import time



start = time.time()
end = time.time()
print(end - start)


start = time.time()
end = time.time()
print(end - start)




So we have used read() as well as readlines(). Both the functions reads file at once in python. But their are some difference that we should be aware of.
read() function read file into a string object. On the other hand readlines() dump the file into an list object. Both are having advantages and disadvantages. If you want to do …