code: def longest_table(dfs):
      
      sorted_indices = sorted((len(df if hasattr(df, '__len__') else []), i) for i, df in enumerate(dfs))
      return dfs[sorted_indices[-1][1]]
docs: Return this single longest DataFrame that among an array/list/tuple of DataFrames
  
      Useful for automagically finding the DataFrame you want when using pd.read_html() on a Wikipedia page.