@@ -1330,7 +1330,9 @@ def factorize(
13301330 ``pd.factorize(values)``. The results are identical for methods like
13311331 :meth:`Series.factorize`.
13321332
1333- >>> codes, uniques = pd.factorize(np.array(['b', 'b', 'a', 'c', 'b'], dtype="O"))
1333+ >>> codes, uniques = pd.factorize(
1334+ ... np.array(['b', 'b', 'a', 'c', 'b'], dtype="O")
1335+ ... )
13341336 >>> codes
13351337 array([0, 0, 1, 2, 0])
13361338 >>> uniques
@@ -1339,8 +1341,9 @@ def factorize(
13391341 With ``sort=True``, the `uniques` will be sorted, and `codes` will be
13401342 shuffled so that the relationship is the maintained.
13411343
1342- >>> codes, uniques = pd.factorize(np.array(['b', 'b', 'a', 'c', 'b'], dtype="O"),
1343- ... sort=True)
1344+ >>> codes, uniques = pd.factorize(
1345+ ... np.array(['b', 'b', 'a', 'c', 'b'], dtype="O"), sort=True
1346+ ... )
13441347 >>> codes
13451348 array([1, 1, 0, 2, 1])
13461349 >>> uniques
@@ -1350,7 +1353,9 @@ def factorize(
13501353 the `codes` with the sentinel value ``-1`` and missing values are not
13511354 included in `uniques`.
13521355
1353- >>> codes, uniques = pd.factorize(np.array(['b', None, 'a', 'c', 'b'], dtype="O"))
1356+ >>> codes, uniques = pd.factorize(
1357+ ... np.array(['b', None, 'a', 'c', 'b'], dtype="O")
1358+ ... )
13541359 >>> codes
13551360 array([ 0, -1, 1, 2, 0])
13561361 >>> uniques
@@ -1384,8 +1389,10 @@ def factorize(
13841389 If NaN is in the values, and we want to include NaN in the uniques of the
13851390 values, it can be achieved by setting ``use_na_sentinel=False``.
13861391
1387- >>> codes, uniques = pd.factorize(np.array(['b', None, 'a', 'c', 'b'], dtype="O"),
1388- ... use_na_sentinel=False)
1392+ >>> codes, uniques = pd.factorize(
1393+ ... np.array(['b', None, 'a', 'c', 'b'], dtype="O"),
1394+ ... use_na_sentinel=False,
1395+ ... )
13891396 >>> codes
13901397 array([0, 1, 2, 3, 0])
13911398 >>> uniques
0 commit comments