parameters: (arff, columns, features_dict)
return_statement: return df
docstring: Convert the ARFF object into a pandas DataFrame.
  
      Parameters
      ----------
      arff : dict
          As obtained from liac-arff object.
  
      columns : list
          Columns from dataframe to return.
  
      features_dict : dict
          Maps feature name to feature info from openml.
  
      Returns
      -------
      dataframe : pandas DataFrame
docstring_summary: Convert the ARFF object into a pandas DataFrame.
docstring_tokens: Convert the ARFF object into a pandas DataFrame .
function: def _convert_arff_data_dataframe(arff, columns, features_dict):
      """Convert the ARFF object into a pandas DataFrame.
  
      Parameters
      ----------
      arff : dict
          As obtained from liac-arff object.
  
      columns : list
          Columns from dataframe to return.
  
      features_dict : dict
          Maps feature name to feature info from openml.
  
      Returns
      -------
      dataframe : pandas DataFrame
      """
      pd = check_pandas_support('fetch_openml with as_frame=True')
  
      attributes = OrderedDict(arff['attributes'])
      arff_columns = list(attributes)
  
      # calculate chunksize
      first_row = next(arff['data'])
      first_df = pd.DataFrame([first_row], columns=arff_columns)
  
      row_bytes = first_df.memory_usage(deep=True).sum()
      chunksize = get_chunk_n_rows(row_bytes)
  
      # read arff data with chunks
      columns_to_keep = [col for col in arff_columns if col in columns]
      dfs = []
      dfs.append(first_df[columns_to_keep])
      for data in _chunk_generator(arff['data'], chunksize):
          dfs.append(pd.DataFrame(data, columns=arff_columns)[columns_to_keep])
      df = pd.concat(dfs, ignore_index=True)
  
      for column in columns_to_keep:
          dtype = _feature_to_dtype(features_dict[column])
          if dtype == 'category':
              dtype = pd.api.types.CategoricalDtype(attributes[column])
          df[column] = df[column].astype(dtype, copy=False)
      return df
function_tokens: def _convert_arff_data_dataframe ( arff , columns , features_dict ) : pd = check_pandas_support ( 'fetch_openml with as_frame=True' ) attributes = OrderedDict ( arff [ 'attributes' ] ) arff_columns = list ( attributes ) # calculate chunksize first_row = next ( arff [ 'data' ] ) first_df = pd . DataFrame ( [ first_row ] , columns = arff_columns ) row_bytes = first_df . memory_usage ( deep = True ) . sum ( ) chunksize = get_chunk_n_rows ( row_bytes ) # read arff data with chunks columns_to_keep = [ col for col in arff_columns if col in columns ] dfs = [ ] dfs . append ( first_df [ columns_to_keep ] ) for data in _chunk_generator ( arff [ 'data' ] , chunksize ) : dfs . append ( pd . DataFrame ( data , columns = arff_columns ) [ columns_to_keep ] ) df = pd . concat ( dfs , ignore_index = True ) for column in columns_to_keep : dtype = _feature_to_dtype ( features_dict [ column ] ) if dtype == 'category' : dtype = pd . api . types . CategoricalDtype ( attributes [ column ] ) df [ column ] = df [ column ] . astype ( dtype , copy = False ) return df