Opening a 20GB file for analysis with pandas
If it's a csv file and you do not need to access all of the data at once when training your algorithm, you can read it in chunks. The pandas.read_csv method allows you to read a file in chunks like this: 

import pandas as pd
for chunk in pd.read_csv(&lt;filepath&gt;, chunksize=&lt;your_chunksize_here&gt;)
    do_processing()
    train_algorithm()


Here is the method's documentation