The CSV file that I want to read does not fit into main memory. How can I read a few (~10K) random lines of it and do some simple statistics on the selected data frame?
import pandas as pd df = pd.read_csv('data.csv', 'r')
df.shape()
sample_data = df.sample(n=1000, replace='False')
#check the shape of sample_data
sample_data.shape()