parameters: (cls, index, nan_as_null=None)
return_statement: return ind
docstring: Convert from a Pandas Index.
  
          Parameters
          ----------
          index : Pandas Index object
              A Pandas Index object which has to be converted
              to cuDF Index.
          nan_as_null : bool, Default None
              If ``None``/``True``, converts ``np.nan`` values
              to ``null`` values.
              If ``False``, leaves ``np.nan`` values as is.
  
          Raises
          ------
          TypeError for invalid input type.
  
          Examples
          --------
          >>> import cudf
          >>> import pandas as pd
          >>> import numpy as np
          >>> data = [10, 20, 30, np.nan]
          >>> pdi = pd.Index(data)
          >>> cudf.Index.from_pandas(pdi)
          Float64Index([10.0, 20.0, 30.0, <NA>], dtype='float64')
          >>> cudf.Index.from_pandas(pdi, nan_as_null=False)
          Float64Index([10.0, 20.0, 30.0, nan], dtype='float64')
docstring_summary: Convert from a Pandas Index.
docstring_tokens: Convert from a Pandas Index .
function: def from_pandas(cls, index, nan_as_null=None):
          """
          Convert from a Pandas Index.
  
          Parameters
          ----------
          index : Pandas Index object
              A Pandas Index object which has to be converted
              to cuDF Index.
          nan_as_null : bool, Default None
              If ``None``/``True``, converts ``np.nan`` values
              to ``null`` values.
              If ``False``, leaves ``np.nan`` values as is.
  
          Raises
          ------
          TypeError for invalid input type.
  
          Examples
          --------
          >>> import cudf
          >>> import pandas as pd
          >>> import numpy as np
          >>> data = [10, 20, 30, np.nan]
          >>> pdi = pd.Index(data)
          >>> cudf.Index.from_pandas(pdi)
          Float64Index([10.0, 20.0, 30.0, <NA>], dtype='float64')
          >>> cudf.Index.from_pandas(pdi, nan_as_null=False)
          Float64Index([10.0, 20.0, 30.0, nan], dtype='float64')
          """
          if not isinstance(index, pd.Index):
              raise TypeError("not a pandas.Index")
  
          ind = cudf.Index(column.as_column(index, nan_as_null=nan_as_null))
          ind.name = index.name
          return ind
function_tokens: def from_pandas ( cls , index , nan_as_null = None ) : if not isinstance ( index , pd . Index ) : raise TypeError ( "not a pandas.Index" ) ind = cudf . Index ( column . as_column ( index , nan_as_null = nan_as_null ) ) ind . name = index . name return ind