For the input of a pytest function I have a dataframe that has 6 rows and 40 columns for example. The dataframe is made up of None values only. What would be the more appropriate way of creating this dataframe. import pandas as pd pd.DataFrame([ [None]*40, [None]*40, [None]*40, [None]*40, [None]*40, [None]*40, ]), columns = input_schema) Or in the format below pd.DataFrame([ [None, None, None, None, None, . . ., None], [None, None, None, None, None, . . ., None], [None, None, None, None, None, . . ., None], [None, None, None, None, None, . . ., None], [None, None, None, None, None, . . ., None], [None, None, None, None, None, . . ., None], ]), columns = input_schema) Memory and Speed wise it has negligible effect at this scale for me. However, what would be the more appropriate style for writing code. Would list comprehension be a more clearer option then at this point if speed and memory have no significant effect, or something else entirely. Continue reading...