@@ -437,11 +437,6 @@ def _determine_setitem_axis(self, row_lookup, col_lookup, row_scaler, col_scaler
437437 """
438438 Determine an axis along which we should do an assignment.
439439
440- Note:
441- axis = 0: column assignment df[col] = item
442- axis = 1: row assignment df.loc[row] = item
443- axis = None: assignment along both axes
444-
445440 Parameters
446441 ----------
447442 row_lookup: slice or list
@@ -457,27 +452,33 @@ def _determine_setitem_axis(self, row_lookup, col_lookup, row_scaler, col_scaler
457452 -------
458453 int or None
459454 None if this will be a both axis assignment, number of axis to assign in other cases.
455+
456+ Notes
457+ -----
458+ axis = 0: column assignment df[col] = item
459+ axis = 1: row assignment df.loc[row] = item
460+ axis = None: assignment along both axes
460461 """
461462 if self .df .shape == (1 , 1 ):
462463 return None if not (row_scaler ^ col_scaler ) else 1 if row_scaler else 0
463464
464465 def get_axis (axis ):
465466 return self .qc .index if axis == 0 else self .qc .columns
466467
467- row_look_len , col_look_len = [
468+ row_lookup_len , col_lookup_len = [
468469 len (lookup )
469470 if not isinstance (lookup , slice )
470471 else compute_sliced_len (lookup , len (get_axis (i )))
471472 for i , lookup in enumerate ([row_lookup , col_lookup ])
472473 ]
473474
474475 if (
475- row_look_len == len (self .qc .index )
476- and col_look_len == 1
476+ row_lookup_len == len (self .qc .index )
477+ and col_lookup_len == 1
477478 and isinstance (self .df , DataFrame )
478479 ):
479480 axis = 0
480- elif col_look_len == len (self .qc .columns ) and row_look_len == 1 :
481+ elif col_lookup_len == len (self .qc .columns ) and row_lookup_len == 1 :
481482 axis = 1
482483 else :
483484 axis = None
0 commit comments