11from  __future__ import  annotations 
22
3- from  typing  import  Any , List , Tuple ,  TypedDict , cast 
3+ from  typing  import  Any , List , TypedDict , cast 
44
55import  narwhals .stable .v1  as  nw 
66import  orjson 
3030    "serialize_dtype" ,
3131    "serialize_frame" ,
3232    "subset_frame" ,
33-     "get_frame_cell" ,
34-     "frame_shape" ,
35-     "copy_frame" ,
36-     "frame_column_names" ,
3733)
3834
3935######################################################################################## 
@@ -289,6 +285,7 @@ def subset_frame(
289285    # int, or even a tuple of ints) 
290286
291287    # The nested if-else structure is used to navigate around narwhals' typing system and lack of `:` operator outside of `[`, `]`. 
288+ 
292289    if  cols  is  None :
293290        if  rows  is  None :
294291            return  data 
@@ -310,32 +307,6 @@ def subset_frame(
310307            return  data [rows , col_names ]
311308
312309
313- # # get_frame_cell ----------------------------------------------------------------------- 
314- def  get_frame_cell (data : DataFrame [Any ], row : int , col : int ) ->  Any :
315-     return  data .item (row , col )
316- 
317- 
318- # shape -------------------------------------------------------------------------------- 
319- def  frame_shape (data : IntoDataFrame ) ->  Tuple [int , int ]:
320-     nw_data  =  as_data_frame (data )
321-     return  nw_data .shape 
322- 
323- 
324- def  column_is_numeric (nw_data : DataFrame [Any ], column_index : int ) ->  bool :
325-     series_dtype : DType  =  nw_data [:, column_index ].dtype 
326-     return  series_dtype .is_numeric ()
327- 
328- 
329- # copy_frame --------------------------------------------------------------------------- 
330- def  copy_frame (nw_data : DataFrameT ) ->  DataFrameT :
331-     return  nw_data .clone ()
332- 
333- 
334- # column_names ------------------------------------------------------------------------- 
335- def  frame_column_names (into_data : IntoDataFrame ) ->  List [str ]:
336-     return  as_data_frame (into_data ).columns 
337- 
338- 
339310class  ScatterValues (TypedDict ):
340311    row_indexes : list [int ]
341312    values : list [CellValue ]
0 commit comments