You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Andreas Saltveit (Jira)" <ji...@apache.org> on 2022/07/11 02:33:00 UTC

[jira] [Created] (SPARK-39732) pyspark.pandas.DataFrame.drop drops dataframe if axis not specified

Andreas Saltveit created SPARK-39732:
----------------------------------------

             Summary: pyspark.pandas.DataFrame.drop drops dataframe if axis not specified
                 Key: SPARK-39732
                 URL: https://issues.apache.org/jira/browse/SPARK-39732
             Project: Spark
          Issue Type: Bug
          Components: Pandas API on Spark
    Affects Versions: 3.3.0
            Reporter: Andreas Saltveit


import pyspark.pandas as pd
data = [\{"Category": 'A', "ID": 1, "Value": 121.44, "Truth": True},
        \{"Category": 'B', "ID": 2, "Value": 300.01, "Truth": False},
        \{"Category": 'C', "ID": 3, "Value": 10.99, "Truth": None},
        \{"Category": 'E', "ID": 4, "Value": 33.87, "Truth": True}
        ]
df = pd.DataFrame(data)
df.display()

# drops dataframe "Query returned no results"
df1=df.drop(["ID","Category"])
df1.display()

# works

df2=df.drop(["ID","Category"], 1)
df2.display()



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org