import pandas as pd
#https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html
def process(chunk):
    """
    faire quelque chose !
    :return:
    """
    pass
filename = "monfichier.csv"
chunksize = 10 ** 6
with pd.read_csv(filename, chunksize=chunksize) as reader:
    for chunk in reader:
        process(chunk)

#pour tout fichier txt, par taille
def read_in_chunks(file_object, chunk_size=1024):
    """1k par 1k"""
    while True:
        data = file_object.read(chunk_size)
        if not data:
            break
        yield data

with open('really_big_file.dat') as f:
    for piece in read_in_chunks(f):
        process(piece)

#pour tout fichier txt, par ligne
BUF_SIZE = 10000
with open('bigfilename','r') as bigfile:
    tmp_lines = bigfile.readlines(BUF_SIZE)
    while tmp_lines:
        process([line for line in tmp_lines])
        tmp_lines = bigfile.readlines(BUF_SIZE)
