You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2023/04/29 03:06:00 UTC

[jira] [Resolved] (SPARK-43270) Implement __dir__() in pyspark.sql.dataframe.DataFrame to include columns

     [ https://issues.apache.org/jira/browse/SPARK-43270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hyukjin Kwon resolved SPARK-43270.
----------------------------------
    Fix Version/s: 3.5.0
       Resolution: Fixed

Issue resolved by pull request 40907
[https://github.com/apache/spark/pull/40907]

> Implement __dir__() in pyspark.sql.dataframe.DataFrame to include columns
> -------------------------------------------------------------------------
>
>                 Key: SPARK-43270
>                 URL: https://issues.apache.org/jira/browse/SPARK-43270
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.5.0
>            Reporter: Beishao Cao
>            Assignee: Beishao Cao
>            Priority: Major
>             Fix For: 3.5.0
>
>         Attachments: Screenshot 2023-04-23 at 6.48.46 PM.png
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Currently, Given {{df.|}} , the databricks notebook will only suggest the method of dataframe(see attached Screenshot of databricks notebook),
> {{However, df.column_name}} is also legal and runnable 
> Hence we should override the parent __{{{}dir__{}}}{{{}(){}}} method on Python {{DataFrame}} class to include column names. And the benefit of this is engine that uses {{dir()}} to generate autocomplete suggestions (e.g. IPython kernel, Databricks Notebooks) will suggest column names on the completion {{df.|}} 



--
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