# Simple script to get the median value of a named column in a CSV file, using pandas and numpy import numpy import pandas table = pandas.read_csv('AGES Full Catalogue.csv') print(numpy.nanmedian(table['TotFlux'])) # To select all entries based on values in one column : notvirgo = table[table['velocity'] > 3000] # Use this as a new table in the same way as before, e.g. : print(nanmedian(notvirgo['TotFlux']))