Created
February 2, 2022 04:07
-
-
Save edwintyh/24be1cdad7ffddb20436b8b0f5b1e2d0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def shape(self): | |
| ''' | |
| Find the number of rows and columns in a DataFrame | |
| ''' | |
| return self.count(), len(self.schema.names) | |
| pyspark.sql.DataFrame.shape = shape |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment