@@ -5231,45 +5231,45 @@ def attribute(self, name: Literal["width", "height", "channel", "mode"] | ImageP
5231
5231
f = native .get_function_from_registry ("image_attribute" )
5232
5232
return Expression ._from_pyexpr (f (self ._expr , lit (name )._expr ))
5233
5233
5234
- def width (self ) -> " Expression" :
5235
- """Gets the width of an image in pixels.
5236
-
5237
- Example:
5238
- >>> # Create a dataframe with an image column
5239
- >>> df = ... # doctest: +SKIP
5240
- >>> df = df.with_column("width", df["images"].image.width()) # doctest: +SKIP
5241
- """
5242
- return self .attribute ("width" )
5243
-
5244
- def height (self ) -> " Expression" :
5245
- """Gets the height of an image in pixels.
5246
-
5247
- Example:
5248
- >>> # Create a dataframe with an image column
5249
- >>> df = ... # doctest: +SKIP
5250
- >>> df = df.with_column("height", df["images"].image.height()) # doctest: +SKIP
5251
- """
5252
- return self .attribute ("height" )
5253
-
5254
- def channel (self ) -> " Expression" :
5255
- """Gets the number of channels in an image.
5256
-
5257
- Example:
5258
- >>> # Create a dataframe with an image column
5259
- >>> df = ... # doctest: +SKIP
5260
- >>> df = df.with_column("channel", df["images"].image.channel()) # doctest: +SKIP
5261
- """
5262
- return self .attribute ("channel" )
5263
-
5264
- def mode (self ) -> " Expression" :
5265
- """Gets the mode of an image as a string.
5266
-
5267
- Example:
5268
- >>> # Create a dataframe with an image column
5269
- >>> df = ... # doctest: +SKIP
5270
- >>> df = df.with_column("mode", df["images"].image.mode()) # doctest: +SKIP
5271
- """
5272
- return self .attribute ("mode" )
5234
+ def width (self ) -> Expression :
5235
+ """Gets the width of an image in pixels.
5236
+
5237
+ Example:
5238
+ >>> # Create a dataframe with an image column
5239
+ >>> df = ... # doctest: +SKIP
5240
+ >>> df = df.with_column("width", df["images"].image.width()) # doctest: +SKIP
5241
+ """
5242
+ return self .attribute ("width" )
5243
+
5244
+ def height (self ) -> Expression :
5245
+ """Gets the height of an image in pixels.
5246
+
5247
+ Example:
5248
+ >>> # Create a dataframe with an image column
5249
+ >>> df = ... # doctest: +SKIP
5250
+ >>> df = df.with_column("height", df["images"].image.height()) # doctest: +SKIP
5251
+ """
5252
+ return self .attribute ("height" )
5253
+
5254
+ def channel (self ) -> Expression :
5255
+ """Gets the number of channels in an image.
5256
+
5257
+ Example:
5258
+ >>> # Create a dataframe with an image column
5259
+ >>> df = ... # doctest: +SKIP
5260
+ >>> df = df.with_column("channel", df["images"].image.channel()) # doctest: +SKIP
5261
+ """
5262
+ return self .attribute ("channel" )
5263
+
5264
+ def mode (self ) -> Expression :
5265
+ """Gets the mode of an image as a string.
5266
+
5267
+ Example:
5268
+ >>> # Create a dataframe with an image column
5269
+ >>> df = ... # doctest: +SKIP
5270
+ >>> df = df.with_column("mode", df["images"].image.mode()) # doctest: +SKIP
5271
+ """
5272
+ return self .attribute ("mode" )
5273
5273
5274
5274
5275
5275
class ExpressionPartitioningNamespace (ExpressionNamespace ):
0 commit comments