Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.3.0
    • 3.3.0
    • PySpark
    • None

    Description

      when MultiIndex.dtypes is supported, we can use:

      >>> idx = pd.MultiIndex.from_arrays([[0, 1, 2, 3, 4, 5, 6, 7, 8], [1, 2, 3, 4, 5, 6, 7, 8, 9]], names=("zero", "one"))
      >>> pdf = pd.DataFrame(
      ...     {"a": [1, 2, 3, 4, 5, 6, 7, 8, 9], "b": [4, 5, 6, 3, 2, 1, 0, 0, 0]},
      ...     index=idx,
      ... )
      >>> psdf = ps.from_pandas(pdf)
      
      >>> ps.DataFrame[psdf.index.dtypes, psdf.dtypes]
      typing.Tuple[pyspark.pandas.typedef.typehints.IndexNameType, pyspark.pandas.typedef.typehints.IndexNameType, pyspark.pandas.typedef.typehints.NameType, pyspark.pandas.typedef.typehints.NameType]
      

      Attachments

        Activity

          People

            dchvn dch nguyen
            dchvn dch nguyen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: