@pytest.mark.parametrize('parallel', [True, False])
def test_fill_include_exclude_names(parallel, read_csv):
 text = '\nA, B, C\n, 1, 2\n3, , 4\n5, 5,\n'
 table = read_csv(text, fill_include_names=['A', 'B'], parallel=parallel)
 assert (table['A'][0] is ma.masked)
 assert (table['B'][1] is ma.masked)
 assert (table['C'][2] is not ma.masked)
 table = read_csv(text, fill_exclude_names=['A', 'B'], parallel=parallel)
 assert (table['C'][2] is ma.masked)
 assert (table['A'][0] is not ma.masked)
 assert (table['B'][1] is not ma.masked)
 table = read_csv(text, fill_include_names=['A', 'B'], fill_exclude_names=['B'], parallel=parallel)
 assert (table['A'][0] is ma.masked)
 assert (table['B'][1] is not ma.masked)
 assert (table['C'][2] is not ma.masked)

@ pytest . mark . parametrize ( 'parallel' , [ True , False ] ) def test_fill_include_exclude_names ( parallel , read_csv ) : text = '\nA, B, C\n, 1, 2\n3, , 4\n5, 5,\n' table = read_csv ( text , fill_include_names = [ 'A' , 'B' ] , parallel = parallel ) assert ( table [ 'A' ] [ 0 ] is ma . masked ) assert ( table [ 'B' ] [ 1 ] is ma . masked ) assert ( table [ 'C' ] [ 2 ] is not ma . masked ) table = read_csv ( text , fill_exclude_names = [ 'A' , 'B' ] , parallel = parallel ) assert ( table [ 'C' ] [ 2 ] is ma . masked ) assert ( table [ 'A' ] [ 0 ] is not ma . masked ) assert ( table [ 'B' ] [ 1 ] is not ma . masked ) table = read_csv ( text , fill_include_names = [ 'A' , 'B' ] , fill_exclude_names = [ 'B' ] , parallel = parallel ) assert ( table [ 'A' ] [ 0 ] is ma . masked ) assert ( table [ 'B' ] [ 1 ] is not ma . masked ) assert ( table [ 'C' ] [ 2 ] is not ma . masked )
fill_include_names and fill_exclude_names should filter missing/empty value handling in the same way that include_names and exclude_names filter output columns .