1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
U
¬ý°dCüã@sHdZddlmZddlmZddlZddlZddlmZm    Z    m
Z
m Z m Z m Z mZmZddlZddlZddlmZddlmmZddlmZmZmZddlmZdd    lmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)dd
l*m+Z,dd l-m.Z.dd l/m0Z0dd l1m2Z2m3Z3ddl4m5Z5ddl6m7Z7m8Z8m9Z9ddl:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEddlFmGZGmHZHddlImJZJmKZKmLZLddlMmNZNmOZOddlPmQmRZSddlTmUZUddlVmWZWddlXmYZYddlZm[Z[ddl\mQm]Z^ddl_m`Z`maZambZbddlcmdZdmeZeddlfmgZgddlhmiZiddljmkZkerˆddllmmZmGdd„demƒZnenjoZodd lpmqZqdd!lmrZrmsZse d"Ztdd#lumvZvneweoƒZne d$d%d&Zxd'd%iZyd%d(d)œd*d+„Zzd%d%d,d-d%d.œd/d0„Z{dGd-d1d%d2œd3d4„Z|Gd5d%„d%eUe[eWƒZ}dHd(d7d8d9œd:d;„Z~ed<d=d>d?œd@dA„ƒZed<dBdCd?œdDdA„ƒZd<d7dEd?œdFdA„ZdS)Iz
SparseArray data structure
é)Ú annotations)ÚabcN)Ú TYPE_CHECKINGÚAnyÚCallableÚLiteralÚSequenceÚTypeVarÚcastÚoverload)Úlib)Ú
BlockIndexÚIntIndexÚ SparseIndex)ÚNaT) Ú    ArrayLikeÚ    AstypeArgÚAxisÚAxisIntÚDtypeÚNpDtypeÚPositionalIndexerÚScalarÚ ScalarIndexerÚSequenceIndexerÚnpt)Úfunction)ÚPerformanceWarning)Úfind_stack_level)Úvalidate_bool_kwargÚvalidate_insert_loc)Ú astype_array)Ú"construct_1d_arraylike_from_scalarÚfind_common_typeÚmaybe_box_datetimelike) Ú is_array_likeÚ is_bool_dtypeÚis_datetime64_any_dtypeÚis_datetime64tz_dtypeÚis_dtype_equalÚ
is_integerÚ is_list_likeÚis_object_dtypeÚ    is_scalarÚis_string_dtypeÚ pandas_dtype)ÚABCIndexÚ    ABCSeries)ÚisnaÚna_value_for_dtypeÚnotna)Ú    arraylikeÚops)ÚOpsMixin)ÚExtensionArray)Ú SparseDtype)Ú PandasObject)Úensure_wrapped_if_datetimelikeÚ extract_arrayÚsanitize_array)Úcheck_array_indexerÚunpack_tuple_and_ellipses)Úinterpolate_2d)Úcheck_below_min_count)Úprinting)ÚEnumc@seZdZdZdS)Úellipsisz...N)Ú__name__Ú
__module__Ú __qualname__ÚEllipsis©rIrIúVd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\pandas/core/arrays/sparse/array.pyrDmsrD)Úspmatrix)Ú FillnaOptionsÚ NumpySorter)ÚintegerÚblock)ÚSeriesÚ SparseArrayTÚ SparseArray)ÚboundÚklassú
np.ndarray)ÚarrÚreturncCs<ztj|j|jjdWStk
r6t |j¡YSXdS)a]
    Create a 0-dim ndarray containing the fill value
 
    Parameters
    ----------
    arr : SparseArray
 
    Returns
    -------
    fill_value : ndarray
        0-dim ndarray with just the fill value.
 
    Notes
    -----
    coerce fill_value to arr dtype if possible
    int64 SparseArray can have NaN as fill_value if there is no missing
    ©ÚdtypeN)ÚnpÚasarrayÚ
fill_valuerYÚsubtypeÚ
ValueError)rVrIrIrJÚ    _get_fill‰sr_rÚstr)ÚleftÚrightÚopÚnamerWc    Cs®| d¡r|dd…}|jj}|jj}t||ƒsxt||gƒ}t||jƒ}t||jƒ}|j|dd}|j|dd}|j}n|}d}|jj    dks˜|jj    dkròt
j dd    *||  ¡|  ¡ƒ}    |t |ƒt |ƒƒ}
W5QRX|jj    dkrè|j} n|j} n\|j |j¡rDt
j dd    &||j|jƒ}    |t |ƒt |ƒƒ}
W5QRX|j} n
|dd
krh||}}|d d…}|d krª|d krªd|›d} |j t
j¡} |j t
j¡}t}nd|›d|›} |j} |j}|dkr |dk ¡r |jjdkr d|›d} |  d¡} | d¡}tt| ƒ}t
j dd    &|| |j|j||j|jƒ\}    } }
W5QRX|dkrŒt||    d| |
d|dt||    d | |
d |dfS|dkrœ|    j}t||    | |
|dS)a4
    Perform a binary operation between two arrays.
 
    Parameters
    ----------
    left : Union[SparseArray, ndarray]
    right : Union[SparseArray, ndarray]
    op : Callable
        The binary operation to perform
    name str
        Name of the callable.
 
    Returns
    -------
    SparseArray
    Ú__ééþÿÿÿF©ÚcopyNrÚignore©ÚallÚré)ÚandÚorÚxorÚboolZsparse_Z_uint8Ú_)ÚfloordivÚmod)ÚiÚuZ_float64Úfloat64ÚdivmodrX)Ú
startswithrYr]r)r#r9r\ÚastypeÚsp_indexÚngapsrZÚerrstateÚto_denser_ÚequalsÚ    sp_valuesÚviewZuint8rrÚanyÚkindÚgetattrÚsplibÚ _wrap_result)rarbrcrdZltypeZrtyper]rYZ result_dtypeÚresultÚfillÚindexÚopnameZleft_sp_valuesZright_sp_valuesZ    sparse_oprIrIrJÚ_sparse_array_op¡s|
 
 
 
 
  ÿ
þ
ý 
 
 
ú    
þ
rŒú Dtype | None)rdrYrWcCsL| d¡r|dd…}|dkr"t}t |¡}t|ƒr<t|ƒ}t||||dS)z.
    wrap op result to have correct dtype
    rerfrg)ÚeqÚneÚltÚgtÚleÚge)Ú sparse_indexr\rY)rzrrr Zitem_from_zerodimr&rR)rdÚdatar”r\rYrIrIrJr‡ s
 
ÿr‡c@sžeZdZUdZdZejegƒBZded<ded<ded<dÏd d dddœdd„Z    e
ddddddœdd„ƒZ e
ddddœdd„ƒZ dÐdddœdd„Z d d!„Ze
d    d d"œd dd"œd#d$„ƒZe
d%d&„ƒZedd'œd(d)„ƒZedd'œd*d+„ƒZedd'œd,d-„ƒZed.d/„ƒZejdd'œd0d/„ƒZed d'œd1d2„ƒZedd'œd3d4„ƒZd5d'œd6d7„Zedd'œd8d9„ƒZdd'œd:d;„Zed5d'œd<d=„ƒZed>d'œd?d@„ƒZed5d'œdAdB„ƒZdCdD„ZdÑddEdFddGœdHdI„Z dÒdd5ddKœdLdM„Z!dNdO„Z"dddPœdQdR„Z#dSdT„Z$dÓddVdWœdXdY„Z%dÔddZd[œd\d]„Z&e'd^d_d`œdadb„ƒZ(e'ddcdddœdedb„ƒZ(ddfdgddœdhdb„Z(didj„Z)d d    dkœddddlœdmdn„Z*dÕdd'œdodp„Z+dddPœdqdr„Z,dÖdtdudvdwdxœdydz„Z-dddPœd{d|„Z.e
dd}dd~œdd€„ƒZ/d×ddd"œd‚dƒ„Z0dddPœd„d…„Z1dd'œd†d‡„Z2dˆd‰„Z3dd'œdŠd‹„Z4dŒd'œddŽ„Z5dUdœddd‘œd’d“„Z6dØd”d•„Z7dÙd—d˜œd™dš„Z8dÚd—d5dd›dœœddž„Z9dÛd—ddŸœd d¡„Z:dÜd¢d˜œd£d¤„Z;d    dUd¥œd¦dd¥œd§d¨„Z<d    dUd¥œd¦dd¥œd©dª„Z=d«dd›d¬œd­d®„Z>d¯d5d°œd±d²„Z?dÝdd5d³œd´dµ„Z@dÞdd5d³œd¶d·„ZAeBjCeDjEfZFd¸dd¹œdºd»„ZGd¼d½„ZHdd'œd¾d¿„ZIeIZJdd'œdÀdÁ„ZKdd'œdÂdÄZLdd'œdÄdńZMdd'œdÆdDŽZNdd'œdÈdɄZOdd'œdÊd˄ZPdßdd̜dÍd΄ZQd    S)àrRaÞ
    An ExtensionArray for storing sparse data.
 
    Parameters
    ----------
    data : array-like or scalar
        A dense array of values to store in the SparseArray. This may contain
        `fill_value`.
    sparse_index : SparseIndex, optional
    fill_value : scalar, optional
        Elements in data that are ``fill_value`` are not stored in the
        SparseArray. For memory savings, this should be the most common value
        in `data`. By default, `fill_value` depends on the dtype of `data`:
 
        =========== ==========
        data.dtype  na_value
        =========== ==========
        float       ``np.nan``
        int         ``0``
        bool        False
        datetime64  ``pd.NaT``
        timedelta64 ``pd.NaT``
        =========== ==========
 
        The fill value is potentially specified in three ways. In order of
        precedence, these are
 
        1. The `fill_value` argument
        2. ``dtype.fill_value`` if `fill_value` is None and `dtype` is
           a ``SparseDtype``
        3. ``data.dtype.fill_value`` if `fill_value` is None and `dtype`
           is not a ``SparseDtype`` and `data` is a ``SparseArray``.
 
    kind : str
        Can be 'integer' or 'block', default is 'integer'.
        The type of storage for sparse locations.
 
        * 'block': Stores a `block` and `block_length` for each
          contiguous *span* of sparse values. This is best when
          sparse data tends to be clumped together, with large
          regions of ``fill-value`` values between sparse values.
        * 'integer': uses an integer to store the location of
          each sparse value.
 
    dtype : np.dtype or SparseDtype, optional
        The dtype to use for the SparseArray. For numpy dtypes, this
        determines the dtype of ``self.sp_values``. For SparseDtype,
        this determines ``self.sp_values`` and ``self.fill_value``.
    copy : bool, default False
        Whether to explicitly copy the incoming `data` array.
 
    Attributes
    ----------
    None
 
    Methods
    -------
    None
 
    Examples
    --------
    >>> from pandas.arrays import SparseArray
    >>> arr = SparseArray([0, 0, 1, 2])
    >>> arr
    [0, 0, 1, 2]
    Fill: 0
    IntIndex
    Indices: array([2, 3], dtype=int32)
    Ú sparse_arrayrÚ _sparse_indexrUÚ_sparse_valuesr9Ú_dtypeNrNFÚSparseIndexKindrrrÚNone)r„rYrirWc
    Csº|dkrt|tƒr|j}t|t|ƒƒrV|dkr4|j}|dkrB|j}|dkrP|j}|j}t|tƒrŒzt |¡}Wnt    k
rŠt
|ƒ}YnXt|tƒrª|dkr¤|j}|j }t |ƒrÚ|dkrÀd}n|j }t||dd}|j}|dk    rêt
|ƒ}|dkrtjg|d}t|ƒs`zt|dd}WnBtk
r^|dkrXt t¡}t tj||d¡}n‚YnX|rn| ¡}|dkr¦|dkrˆ|jn|}|dkržtj}nt|ƒ}t|t|ƒƒrØ|dkrØ|j}tj|j|d}    nÄ|dkrjt|dd}t|tjƒsRt|jƒrHtjd|j›dt t!ƒdtj|d    d}|t"krHt #d
d ¡}t |¡}t$||||d \}    }}n2tj||d}    t%|    ƒ|j&krœt'd t|    ƒ›dƒ‚||_|    |_(t|    j|ƒ|_)dS)NrnrX)rŠT)Z extract_numpyzCreating SparseArray from z^ data loses timezone information. Cast to object before sparse to retain timezone information.©Ú
stacklevelzdatetime64[ns]rÚns)r„r\rYzNon array-like type z' must have the same length as the index)*Ú
isinstancer9r\Útyper|rYrr`Zconstruct_from_stringÚ    TypeErrorr/r]r-Úlengthr"rZÚarrayr%r=r^ÚobjectZ
atleast_1dr[riÚnanr3r—r<Úndarrayr(ÚwarningsÚwarnÚ UserWarningrrÚ
datetime64Ú _make_sparseÚlenÚnpointsÚAssertionErrorr˜r™)
Úselfr•r”r\r„rYrir­Zfill_value_dtypeÚ sparse_valuesrIrIrJÚ__init__qsš    
 
 
 
 
 
 
 
ÿ
   û
 
ù ÿzSparseArray.__init__ztype[SparseArrayT]rQ)Úclsr–r”rYrWcCs t |¡}||_||_||_|S©N)r¤Ú__new__r—r˜r™)r²r–r”rYÚnewrIrIrJÚ _simple_newós
 
zSparseArray._simple_newrK)r²r•rWc    Csv|j\}}|dkr"td|›dƒ‚| ¡}| ¡|j}|j}tjd|jd     ¡}t
|j|ƒ}t ||ƒ}|  |||¡S)a‚
        Create a SparseArray from a scipy.sparse matrix.
 
        Parameters
        ----------
        data : scipy.sparse.sp_matrix
            This should be a SciPy sparse matrix where the size
            of the second dimension is 1. In other words, a
            sparse matrix with a single column.
 
        Returns
        -------
        SparseArray
 
        Examples
        --------
        >>> import scipy.sparse
        >>> mat = scipy.sparse.coo_matrix((4, 1))
        >>> pd.arrays.SparseArray.from_spmatrix(mat)
        [0.0, 0.0, 0.0, 0.0]
        Fill: 0.0
        IntIndex
        Indices: array([], dtype=int32)
        rnz''data' must have a single column, not 'ú'rrX) Úshaper^ZtocscZ sort_indicesr•ÚindicesrZr£rYÚitemr9rr¶)    r²r•r¢ZncolrVÚidxZzerorYrŠrIrIrJÚ from_spmatrixs
 
zSparseArray.from_spmatrixzNpDtype | None)rYrWcCs”|j}|jjdkr|jS|dkrpt|jjƒr>|tkr>t d¡}zt     |jjt
|ƒ¡}Wnt k
rnt }YnXtj |j||d}|j||jj<|S)NrrrX)r\r|r}rr'rYrrZrªÚ result_typer r¡r¤Úfullr¸r¹)r¯rYr\ÚoutrIrIrJÚ    __array__,s  
 
zSparseArray.__array__cCsd}t|ƒ‚dS)Nz8SparseArray does not support item assignment via setitem)r¡)r¯ÚkeyÚvalueÚmsgrIrIrJÚ __setitem__EszSparseArray.__setitem__©rYricCs |||dS©NrXrI)r²ZscalarsrYrirIrIrJÚ_from_sequenceLszSparseArray._from_sequencecCs|||jdSrÆrX)r²ÚvaluesÚoriginalrIrIrJÚ_from_factorizedPszSparseArray._from_factorized)rWcCs|jS)zX
        The SparseIndex containing the location of non- ``fill_value`` points.
        )r—©r¯rIrIrJr|WszSparseArray.sp_indexcCs|jS)a
        An ndarray containing the non- ``fill_value`` values.
 
        Examples
        --------
        >>> from pandas.arrays import SparseArray
        >>> s = SparseArray([0, 0, 1, 0, 2], fill_value=0)
        >>> s.sp_values
        array([1, 2])
        )r˜rËrIrIrJr^s zSparseArray.sp_valuescCs|jSr³)r™rËrIrIrJrYlszSparseArray.dtypecCs|jjS)zš
        Elements in `data` that are `fill_value` are not stored.
 
        For memory savings, this should be the most common value in the array.
        )rYr\rËrIrIrJr\pszSparseArray.fill_valuecCst|jj|ƒ|_dSr³)r9rYr]r™)r¯rÂrIrIrJr\yscCst|jtƒrdSdSdS)zW
        The kind of sparse index for this array. One of {'integer', 'block'}.
        rNrON)rŸr|rrËrIrIrJr„}s zSparseArray.kindcCs|j}t|ƒ}||Sr³)rr4)r¯Úsp_valsÚmaskrIrIrJÚ_valid_sp_values‡szSparseArray._valid_sp_valuesÚintcCs|jjSr³)r|r¢rËrIrIrJÚ__len__szSparseArray.__len__cCs|jjSr³)r™Z_is_na_fill_valuerËrIrIrJÚ_null_fill_valueszSparseArray._null_fill_valuecCs|jrt|ƒS|j|kSdSr³)rÑr2r\)r¯r\rIrIrJÚ_fill_value_matches”szSparseArray._fill_value_matchescCs|jj|jjSr³)rÚnbytesr|rËrIrIrJrӚszSparseArray.nbytesÚfloatcCs|jj|jjS)zú
        The percent of non- ``fill_value`` points, as decimal.
 
        Examples
        --------
        >>> from pandas.arrays import SparseArray
        >>> s = SparseArray([0, 0, 1, 1, 1], fill_value=0)
        >>> s.density
        0.6
        )r|r­r¢rËrIrIrJÚdensityžs zSparseArray.densitycCs|jjS)zë
        The number of non- ``fill_value`` points.
 
        Examples
        --------
        >>> from pandas.arrays import SparseArray
        >>> s = SparseArray([0, 0, 1, 1, 1], fill_value=0)
        >>> s.npoints
        3
        )r|r­rËrIrIrJr­¬s zSparseArray.npointscCsftt|jƒ}|jr,t|ƒ t|jƒ|j|¡Stj    t
|ƒdtj d}t|jƒ||jj <t|ƒ|d|dS)NFrX©r\rY) r9rrrÑr r¶r2rr|rZr¾r¬Úbool_r¹)r¯rYrÍrIrIrJr2ºs  zSparseArray.isnazFillnaOptions | Nonez
int | None)r¯ÚmethodÚlimitrWcCs´|dkr|dks |dk    r(|dk    r(tdƒ‚|dk    rpd}tj|ttƒdt |¡}t|||dt|ƒ||j    dSt 
t |j ƒ||j ¡}|j ržt|jj|d}n|j}| ||j|¡S)a¨
        Fill missing values with `value`.
 
        Parameters
        ----------
        value : scalar, optional
        method : str, optional
 
            .. warning::
 
               Using 'method' will result in high memory use,
               as all `fill_value` methods will be converted to
               an in-memory ndarray
 
        limit : int, optional
 
        Returns
        -------
        SparseArray
 
        Notes
        -----
        When `value` is specified, the result's ``fill_value`` depends on
        ``self.fill_value``. The goal is to maintain low-memory use.
 
        If ``self.fill_value`` is NA, the result dtype will be
        ``SparseDtype(self.dtype, fill_value=value)``. This will preserve
        amount of memory used before and after filling.
 
        When ``self.fill_value`` is not NA, the result dtype will be
        ``self.dtype``. Again, this preserves the amount of memory used.
        Nz(Must specify one of 'method' or 'value'.z0fillna with 'method' requires high memory usage.rœ)rØrÙ©r\)r^r§r¨rrrZr[r@r r\Úwherer2rrÑr9rYr]r¶r—)r¯rÂrØrÙrÃZ
new_valuesZ    new_dtyperIrIrJÚfillnaÄs*&ÿÿý
zSparseArray.fillnarn)r¯ÚperiodsrWcCs¾t|ƒr|dkr| ¡St|ƒr(|jj}t ||jj¡}||jjkrX| t    ||j
ƒ¡}n|}|j |gt t |ƒt|ƒƒ|jd}|dkrœ|}|d| …}n|t |ƒd…}|}| ||g¡S)NrrX)r¬rir2rYÚna_valuerZr½r]r{r9r\rÇÚminÚabsÚ_concat_same_type)r¯rÝr\r]rVÚemptyÚaÚbrIrIrJÚshifts$ ÿzSparseArray.shiftcCsht|ƒdks|jjt|ƒkr dS|jj}t|ƒr<|ddkr@dStjt |¡df}||dk ¡dS)zh
        Get the location of the first fill value.
 
        Returns
        -------
        int
        réÿÿÿÿrfrn)r¬r|r­r¹rZZr_ÚdiffÚargmax)r¯r¹rçrIrIrJÚ_first_fill_value_loc!sz!SparseArray._first_fill_value_loc)r¯rWcCsbt |j¡}t|jƒt|ƒkrN| ¡}tt |jd|…¡ƒ}t |||j¡}t|ƒj    ||j
dSrÆ) ÚalgosÚuniquerr¬rérZÚinsertr\r rÇrY)r¯ÚuniquesZfill_locZ
insert_locrIrIrJrë6s  zSparseArray.uniquecCst |¡|jfSr³)rZr[r\rËrIrIrJÚ_values_for_factorizeDsz!SparseArray._values_for_factorizeTztuple[np.ndarray, SparseArray])Úuse_na_sentinelrWcCs.tjt |¡|d\}}t||jd}||fS)N)rïrX)rêÚ    factorizerZr[rRrY)r¯rïÚcodesríZ
uniques_sprIrIrJrðHs     ÿ
zSparseArray.factorizerP)ÚdropnarWc    Cs´ddlm}m}tj|j|d\}}|jj}|dkrŽ|jr>|sŽ|jrLt    |ƒn||j
k}|  ¡rp|||7<nt   |d|j
¡}t   |d|¡}t|tƒs¢||ƒ}n|}|||ddS)a
        Returns a Series containing counts of unique values.
 
        Parameters
        ----------
        dropna : bool, default True
            Don't include counts of NaN, even if NaN is in sp_values.
 
        Returns
        -------
        counts : Series
        r)ÚIndexrP)ròF)rŠri)ÚpandasrórPrêZvalue_counts_arraylikerr|r}rÑr2r\rƒrZrìrŸr0)    r¯ròrórPÚkeysÚcountsZfcountsrÍrŠrIrIrJÚ value_countsWs 
 
zSparseArray.value_countsrr)rÁrWcCsdSr³rI©r¯rÁrIrIrJÚ __getitem__‚szSparseArray.__getitem__z,SequenceIndexer | tuple[int | ellipsis, ...])r¯rÁrWcCsdSr³rIrørIrIrJrù†sz.PositionalIndexer | tuple[int | ellipsis, ...]zSparseArrayT | Anyc Cs‚t|tƒr"t|ƒ}|tkr"tdƒ‚t|ƒr4| |¡St|tƒrN| ¡|}n"t|tƒrf|j    dksp|j    dkr@|j
dkr~dn|j
}|dkr˜|t |ƒ7}|j dkrªt |ƒn|j }|dkrÄ|t |ƒ7}|j j}t ||k||k@¡}|j|}|| ¡}|dkr
||8}t tt |ƒƒ|ƒ}    t|    ||jƒ}
t|ƒ ||
|j¡Stjt |ƒtjd|}| |¡Sn
t|ƒsztdƒ‚nöt|tƒr
t|ƒrt |j!ƒr°| |j j|j¡S|j!sÆ| |j j¡St |ƒ} tj"| dtj#d} d| |j j<| t | ¡| ¡St $|¡}t%||ƒ}t& '|¡rJt(tj)|ƒ}| tjt |ƒtjd|¡St*|dƒr`| |¡Std    |›d
ƒ‚t|ƒ||jd S) NzCannot slice with EllipsisrnrrXzuonly integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indicesTFrÐzCannot slice with 'r·©r„)+rŸÚtupler?rHr^r*Ú _get_val_atrÚsliceÚstepÚstartr¬Ústopr|r¹rZÚ flatnonzerorriÚrangeÚmake_sparse_indexr„r r¶rYÚarangeÚint32Útaker+Ú
IndexErrorrRr&r2r\r¾r×r[r>ÚcomZis_bool_indexerr
r¦Úhasattr) r¯rÁZ
data_slicerÿÚendr¹Z    keep_indsrÌr|Znew_lenÚ new_sp_indexÚnrÍrIrIrJrùsd
 
 
 
 
 
 
ÿ 
 
 
 
cCsHt|t|ƒƒ}|j |¡}|dkr(|jS|j|}t||jjƒ}|SdS)Nræ)r r¬r|Úlookupr\rr$rY)r¯ÚlocZsp_locÚvalrIrIrJrüës 
zSparseArray._get_val_at)Ú
allow_fillr\)r¯rrWcCs‚t|ƒrtd|›dƒ‚tj|tjd}d}|jdkrLtjgdd}|j}n|r`|j||d}n
|     |¡St
|ƒ||j |j |dS)Nz*'indices' must be an array, not a scalar 'z'.rXrr¤rÚ)r\r„rY) r-r^rZr[rÚsizer£rYÚ_take_with_fillÚ_take_without_fillr r\r„)r¯r¹rr\rYrˆrIrIrJrös 
 
ÿzSparseArray.takec Csš|dkr|jj}| ¡dkr$tdƒ‚| ¡t|ƒkr<tdƒ‚t|ƒdkrŠ|dk ¡r‚t     |j
t |ƒ¡}tj ||d}|  |¡|Stdƒ‚|j |¡}|dk}|dk|@}|jjdkrÚ| ¡rÚtj|j|j|jjd}n¼|jjdkrt     |jjt |ƒ¡}tj|j||d}n†|j
 |¡}||dk}    ||dk}
|j} |     ¡rjt     | t |jƒ¡} | | ¡}|j||<|
 ¡r–t     | t |ƒ¡} | | ¡}|||<|S)NræzKInvalid value in 'indices'. Must be between -1 and the length of the array.ú!out of bounds value in 'indices'.rrXú.cannot do a non-empty take from an empty axes.rÖ)rYrÞrßr^Úmaxr¬rrlrZr½rr Z
empty_liker‰r|Ú lookup_arrayr­r¾r¸r\r]rrƒr{) r¯r¹r\rYZtakenÚ
sp_indexerZnew_fill_indicesZold_fill_indicesr™Zm0Úm1r½rIrIrJr
sP ÿ  
 ÿ   
 
 
 
 
zSparseArray._take_with_fillc    CsÄ|dk}t|ƒ}| ¡|ks*| ¡| krB|dkr:tdƒ‚tdƒ‚| ¡rb| ¡}|||7<|j |¡}|dk}|j||}t     
|¡j t    j dd}t t|ƒ||jd}t|ƒj|||jdS)    NrrrræFrhrúrX)r¬rrßrrƒrir|rrrZrr{rrr„r r¶rY)    r¯r¹Zto_shiftr rZ
value_maskZ new_sp_valuesZ value_indicesr rIrIrJrKs zSparseArray._take_without_fillrazArrayLike | objectzLiteral[('left', 'right')]rMznpt.NDArray[np.intp] | np.intp)ÚvÚsideÚsorterrWcCsNd}tj|ttƒdt|ƒs(t |¡}t |¡}tj||jjd     |||¡S)Nz(searchsorted requires high memory usage.rœrX)
r§r¨rrr-rZr[rYr]Ú searchsorted)r¯rrrrÃrIrIrJrbs 
 
zSparseArray.searchsortedcCs|j ¡}| ||j|j¡Sr³)rrir¶r|rY)r¯rÈrIrIrJrios
zSparseArray.copyzSequence[SparseArrayT])r²Ú    to_concatrWcCs|dj}g}d}|r"|dj}nd}|dkr’g}|D]:}|jj ¡}||7}||jj7}| |j¡| |¡q6t     |¡}    t     |¡}
t
||
ƒ} n~g} g} |D]F}|j  ¡}| |j¡|  |j  ¡|¡|  |j ¡||jj7}qžt     |¡}    t     | ¡}t     | ¡}t|||ƒ} ||    | |dS)NrrN©r”r\)r\r„r|r¹rir¢ÚappendrrZZ concatenaterZto_block_indexÚblocsÚblengthsr )r²rr\rÈr¢Zsp_kindr¹rVZint_idxr•Z indices_arrr|r"r!Z    block_idxZ    blocs_arrZ blengths_arrrIrIrJráss<
 
 
 
 
 
 
 zSparseArray._concat_same_typezAstypeArg | NonecCs¢t||jƒr|s|S| ¡St|ƒ}t|tƒsNt |¡}t|ƒ}t    ||ddS|j
  |¡}t|j ƒ}t tj
|ƒ}t|jƒ}t    |||d}t |¡}| ||j|¡S)aE
        Change the dtype of a SparseArray.
 
        The output will always be a SparseArray. To convert to a dense
        ndarray with a certain dtype, use :meth:`numpy.asarray`.
 
        Parameters
        ----------
        dtype : np.dtype or ExtensionDtype
            For SparseDtype, this changes the dtype of
            ``self.sp_values`` and the ``self.fill_value``.
 
            For other dtypes, this only changes the dtype of
            ``self.sp_values``.
 
        copy : bool, default True
            Whether to ensure a copy is made, even if not necessary.
 
        Returns
        -------
        SparseArray
 
        Examples
        --------
        >>> arr = pd.arrays.SparseArray([0, 0, 1, 2])
        >>> arr
        [0, 0, 1, 2]
        Fill: 0
        IntIndex
        Indices: array([2, 3], dtype=int32)
 
        >>> arr.astype(SparseDtype(np.dtype('int32')))
        [0, 0, 1, 2]
        Fill: 0
        IntIndex
        Indices: array([2, 3], dtype=int32)
 
        Using a NumPy dtype with a different kind (e.g. float) will coerce
        just ``self.sp_values``.
 
        >>> arr.astype(SparseDtype(np.dtype('float64')))
        ... # doctest: +NORMALIZE_WHITESPACE
        [nan, nan, 1.0, 2.0]
        Fill: nan
        IntIndex
        Indices: array([2, 3], dtype=int32)
 
        Using a SparseDtype, you can also change the fill value as well.
 
        >>> arr.astype(SparseDtype("float64", fill_value=0.0))
        ... # doctest: +NORMALIZE_WHITESPACE
        [0.0, 0.0, 1.0, 2.0]
        Fill: 0.0
        IntIndex
        Indices: array([2, 3], dtype=int32)
        FrÅrh)r)r™rir/rŸr9rZr[r;r!rYZ update_dtypeZ_subtype_with_strr
rr¶r|)r¯rYriZ future_dtyperÈr]rrIrIrJr{­s 9 
 
 
 
 
zSparseArray.astypecsvtˆtƒrˆ ¡‰tˆtjƒrDˆ |j|j¡}‡fdd„|jDƒ}nˆ|jƒ}‡fdd„|jDƒ}t|ƒ||j    |dS)aÅ
        Map categories using an input mapping or function.
 
        Parameters
        ----------
        mapper : dict, Series, callable
            The correspondence from old values to new.
 
        Returns
        -------
        SparseArray
            The output array will have the same density as the input.
            The output fill value will be the result of applying the
            mapping to ``self.fill_value``
 
        Examples
        --------
        >>> arr = pd.arrays.SparseArray([0, 1, 2])
        >>> arr.map(lambda x: x + 10)
        [10, 11, 12]
        Fill: 10
        IntIndex
        Indices: array([1, 2], dtype=int32)
 
        >>> arr.map({0: 10, 1: 11, 2: 12})
        [10, 11, 12]
        Fill: 10
        IntIndex
        Indices: array([1, 2], dtype=int32)
 
        >>> arr.map(pd.Series([10, 11, 12], index=[0, 1, 2]))
        [10, 11, 12]
        Fill: 10
        IntIndex
        Indices: array([1, 2], dtype=int32)
        csg|]}ˆ |d¡‘qSr³)Úget©Ú.0Úx©ÚmapperrIrJÚ
<listcomp>)sz#SparseArray.map.<locals>.<listcomp>csg|] }ˆ|ƒ‘qSrIrIr$r'rIrJr),sr)
rŸr1Úto_dictrÚMappingr#r\rr r|)r¯r(r\rrIr'rJÚmapüs(
 
zSparseArray.mapcCstj||jjdS)zr
        Convert SparseArray to a NumPy array.
 
        Returns
        -------
        arr : NumPy array
        rX)rZr[rrYrËrIrIrJr0szSparseArray.to_densecCs4t |||¡}t|j|jd}t|ƒj||d}|S)NrÚrX)rZrÛr9rYr\r rÇ)r¯rÍrÂZnaive_implementationrYrˆrIrIrJÚ_where:szSparseArray._wherecCsVt|tƒrF|\}\}}t g¡}| |¡||_||_t|j|ƒ|_    n |j
  |¡dS)z*Necessary for making this object picklableN) rŸrûrZr£Ú __setstate__r˜r—r9rYr™Ú__dict__Úupdate)r¯ÚstateZnd_stater\r|r°rIrIrJr.Es
 
 
zSparseArray.__setstate__ztuple[npt.NDArray[np.int32]]cCs,|jdkr|jjfS|jj|jdkfSdS)Nr)r\r|r¹rrËrIrIrJÚnonzeroSs
 
zSparseArray.nonzero©Úskipnar`)rdr4cKsLt||dƒ}|dkr*td|›d|j›ƒ‚|r4|}n| ¡}t||ƒf|ŽS)Nzcannot perform z  with type )r…r¡rYrò)r¯rdr4ÚkwargsrØrVrIrIrJÚ_reduce]s zSparseArray._reducecOs:t ||¡|j}t|ƒt|ƒkr2t |j¡s2dS| ¡S)z£
        Tests whether all elements evaluate True
 
        Returns
        -------
        all : bool
 
        See Also
        --------
        numpy.all
        F)ÚnvZ validate_allrr¬rZrlr\©r¯ÚaxisÚargsr5rÈrIrIrJrljs
zSparseArray.allrr)r9cOs>t ||¡|j}t|ƒt|ƒkr2t |j¡r2dS| ¡ ¡S)z¯
        Tests whether at least one of elements evaluate True
 
        Returns
        -------
        any : bool
 
        See Also
        --------
        numpy.any
        T)r7Z validate_anyrr¬rZrƒr\rºr8rIrIrJrƒs
zSparseArray.anyr)r9Ú    min_countr4rWc
Osªt ||¡|j}| ¡}|jjdko,|j }|rF|sFt|jj    ddS|jrnt
|j d|ƒrjt|jj    ddS|S|jj}    t
|j d||    ƒr˜t|jj    ddS||j |    SdS)a 
        Sum of non-NA/null values
 
        Parameters
        ----------
        axis : int, default 0
            Not Used. NumPy compatibility.
        min_count : int, default 0
            The required number of valid values to perform the summation. If fewer
            than ``min_count`` valid values are present, the result will be the missing
            value indicator for subarray type.
        *args, **kwargs
            Not Used. NumPy compatibility.
 
        Returns
        -------
        scalar
        rF©ÚcompatN) r7Z validate_sumrÎÚsumr|r}rÑr3rYr]rAr¸r\)
r¯r9r;r4r:r5Ú
valid_valsÚsp_sumZhas_naÚnsparserIrIrJr>”s zSparseArray.sum)r9rWcOs\t ||¡|dk    r.||jkr.td|›dƒ‚|jsDt| ¡ƒ ¡St|j ¡|j    |j
dS)a 
        Cumulative sum of non-NA/null values.
 
        When performing the cumulative summation, any non-NA/null values will
        be skipped. The resulting SparseArray will preserve the locations of
        NaN values, but the fill value will be `np.nan` regardless.
 
        Parameters
        ----------
        axis : int or None
            Axis over which to perform the cumulative summation. If None,
            perform cumulative summation over flattened array.
 
        Returns
        -------
        cumsum : SparseArray
        Nzaxis(=z) out of boundsr) r7Zvalidate_cumsumÚndimr^rÑrRrÚcumsumrr|r\)r¯r9r:r5rIrIrJrCÀs ýzSparseArray.cumsumrcOsRt ||¡|j}| ¡}t|ƒ}|jr0||S|jj}||j|||SdS)zb
        Mean of non-NA/null values
 
        Returns
        -------
        mean : float
        N)    r7Z validate_meanrÎr>r¬rÑr|r}r\)r¯r9r:r5r?r@ÚctrArIrIrJÚmeanàs zSparseArray.mean)r9r4zAxisInt | NonecCst ||j¡|jd|dS)a4
        Max of array values, ignoring NA values if specified.
 
        Parameters
        ----------
        axis : int, default 0
            Not Used. NumPy compatibility.
        skipna : bool, default True
            Whether to ignore NA values.
 
        Returns
        -------
        scalar
        rr3©r7Zvalidate_minmax_axisrBÚ_min_max©r¯r9r4rIrIrJrószSparseArray.maxcCst ||j¡|jd|dS)a4
        Min of array values, ignoring NA values if specified.
 
        Parameters
        ----------
        axis : int, default 0
            Not Used. NumPy compatibility.
        skipna : bool, default True
            Whether to ignore NA values.
 
        Returns
        -------
        scalar
        rßr3rFrHrIrIrJrßszSparseArray.minzLiteral[('min', 'max')])r„r4rWcCsš|j}|j o|jjdk}t|ƒdkr|t||ƒƒ}|rR|dkrBtnt}|||jƒS|rZ|S|jjdkrj|St    |j
j ddSn|r†|jSt    |j
j ddSdS)zº
        Min/max of non-NA/null values
 
        Parameters
        ----------
        kind : {"min", "max"}
        skipna : bool
 
        Returns
        -------
        scalar
        rrFr<N) rÎrÑr|r}r¬r…rrßr\r3rYr])r¯r„r4r?Zhas_nonnull_fill_valsZ
sp_min_maxÚfuncrIrIrJrGs     zSparseArray._min_maxzLiteral[('argmin', 'argmax')])r„rWc CsÆ|j}|jj}t t|ƒ¡}|dkr*tjntj}t |j    d¡}||}||}|||ƒ}    ||    }
t|j
ƒrv|
S|dkr||
|j
kr|
S|dkrª||
|j
krª|
S|  ¡} | dkr¾|
S| SdS)NrèrÚargminræ) r˜r—r¹rZr[r2rèrJrr¸r\ré) r¯r„rÈrŠrÍrIr»Znon_nansZ non_nan_idxZ
_candidateÚ    candidateZ_locrIrIrJÚ_argmin_argmax:s&
 
 
zSparseArray._argmin_argmax)r4rWcCs"t|dƒ|s|jrt‚| d¡S)Nr4rè©rZ_hasnaÚNotImplementedErrorrL©r¯r4rIrIrJrèTs
 
zSparseArray.argmaxcCs"t|dƒ|s|jrt‚| d¡S)Nr4rJrMrOrIrIrJrJZs
 
zSparseArray.argminznp.ufunc)ÚufuncrØc s¬| dd¡}||D]}t|ˆjtfƒstSqtjˆ||f|ž|Ž}|tk    rV|Sd|krxtjˆ||f|ž|Ž}|S|dkr¢tj    ˆ||f|ž|Ž}|tk    r¢|St
|ƒdkr*t ||ƒˆj f|Ž}    t ||ƒˆj f|Ž}
|jdkrt‡fdd„t|    |
ƒDƒƒ} | S|dkr|    Sˆ |    ˆjt|    j|
ƒ¡Stdd„|Dƒƒ} t ||ƒ| |Ž}|rlt
|ƒdkrh|d}|S|jdkrŽt‡fd    d„|DƒƒS|d
krœdStˆƒ|ƒSdS) Nr¿rIÚreducernc3s*|]"\}}ˆ |ˆjt|j|ƒ¡VqdSr³)r¶r|r9rY)r%Zsp_valueZfvrËrIrJÚ    <genexpr>Šs ý
ÿz.SparseArray.__array_ufunc__.<locals>.<genexpr>css|]}t |¡VqdSr³)rZr[r$rIrIrJrR™src3s|]}tˆƒ|ƒVqdSr³)r r$rËrIrJrR¡sÚat)r#rŸÚ_HANDLED_TYPESrRÚNotImplementedr6Z!maybe_dispatch_ufunc_to_dunder_opr5Zdispatch_ufunc_with_outZdispatch_reduction_ufuncr¬r…rr\ZnoutrûÚzipr¶r|r9rYr ) r¯rPrØÚinputsr5r¿r&rˆÚresrr\ZarraysZ
new_inputsrIrËrJÚ__array_ufunc__fs€  
ÿÿÿÿÿÿÿÿÿ  ü
 
ÿ 
zSparseArray.__array_ufunc__c
Cs6|j}t|tƒrt||||ƒSt|ƒr¦tjdd&|t|ƒt |¡ƒ}||j    |ƒ}W5QRX|dkr–|\}}|\}}    t
|||j |ƒt
|||j |    ƒfSt
|||j |ƒSt |¡}tjddpt |ƒt |ƒkrêt dt |ƒ›dt |ƒ›ƒ‚t|tƒst|ddƒ}
t||j|
d}t||||ƒW5QR£SQRXdS)Nrjrkryzlength mismatch: z vs. rYrÖ)rErŸrRrŒr-rZr~r_r[rr‡r|r¬r®r…r\) r¯ÚotherrcÚop_namer‰rˆrarbZlfillZrfillrYrIrIrJÚ _arith_method¬s0
þ
ÿ  zSparseArray._arith_methodc    Csðt|ƒs t|t|ƒƒs t |¡}t|tjƒr:t||jd}t|tƒrŠt|ƒt|ƒkrpt    dt|ƒ›dt|ƒ›ƒ‚|j
  d¡}t ||||ƒStj dd<||j|ƒ}tjt|ƒ|tjd}||j|ƒ||jj<W5QRXt|ƒ||tjdSdS)    NrÚz operands have mismatched length z and rsrjrkrXrÖ)r-rŸr rZr[r¦rRr\r¬r^rEÚstriprŒr~r¾r×rr|r¹)r¯rZrcr[r\rˆrIrIrJÚ _cmp_methodÍs(
 
ÿ  ýzSparseArray._cmp_methodcCsn|t |j¡ƒ ¡}t|jj|ƒ}t|jƒs6||jkrV||jƒ}t    |ƒ 
||j |j¡St    |ƒ||  ¡ƒ|dSrÆ) rZr£r\rºr9rYr]r2rr r¶r|r)r¯rcr\rYrÈrIrIrJÚ _unary_methodís 
zSparseArray._unary_methodcCs | tj¡Sr³)r_ÚoperatorÚposrËrIrIrJÚ__pos__øszSparseArray.__pos__cCs | tj¡Sr³)r_r`ÚnegrËrIrIrJÚ__neg__ûszSparseArray.__neg__cCs | tj¡Sr³)r_r`ÚinvertrËrIrIrJÚ
__invert__þszSparseArray.__invert__cCs | tj¡Sr³)r_r`ràrËrIrIrJÚ__abs__szSparseArray.__abs__cCs6t |¡}t |j¡}t |j¡}|›d|›d|›S)Nz
Fill: Ú
)rBZ pprint_thingr\r|)r¯Zpp_strZpp_fillZpp_indexrIrIrJÚ__repr__s
  zSparseArray.__repr__)ÚboxedcCsdSr³rI)r¯rjrIrIrJÚ
_formatter szSparseArray._formatter)NNrNNF)N)NNN)rnN)T)T)N)raN)NT)N)r)rrT)r)r)T)T)F)RrErFrGÚ__doc__Z_subtypr:Z _hidden_attrsÚ    frozensetÚ__annotations__r±Ú classmethodr¶r¼rÀrÄrÇrÊÚpropertyr|rrYr\Úsetterr„rÎrÐrÑrÒrÓrÕr­r2rÜrårérërîrðr÷r rùrürrrrrirár{r,rr-r.r2r6rlrƒr>rCrErrßrGrLrèrJrZr¦ÚnumbersÚNumberrTrYr\r^Z_logical_methodr_rbrdrfrgrirkrIrIrIrJrR$sÚ
Fù +
 
       üBþ+^ ÿAü 9O4
 
 
ü, #
F! rOršznp.dtype | None)rVr„rYc    Csðt|tjƒst‚|jdkr"tdƒ‚|dkr4t|jƒ}t|ƒrFt    |ƒ}n4t
|jƒrZ|  t ¡}t |jƒrrt ||¡}n||k}t|ƒ}|t|ƒkr˜|jj}n| ¡d  tj¡}t|||ƒ}||}|dk    ræt|ƒ}t||d}t |¡}|||fS)a@
    Convert ndarray to sparse format
 
    Parameters
    ----------
    arr : ndarray
    kind : {'block', 'integer'}
    fill_value : NaN or another value
    dtype : np.dtype, optional
    copy : bool, default False
 
    Returns
    -------
    (sparse_values, index, fill_value) : (ndarray, SparseIndex, Scalar)
    rnzexpected dimension <= 1 dataNrrX)rŸrZr¦r®rBr¡r3rYr2r4r.r{r¤r,r†Zmake_mask_object_ndarrayr¬r|r¹r2rrr;r!r[)    rVr„r\rYrÍr¢r¹rŠZsparsified_valuesrIrIrJr«s.
 
 
 
 
 
 
 
r«rÏzLiteral['block']r )r¢r„rWcCsdSr³rI©r¢r¹r„rIrIrJrQsrzLiteral['integer']rcCsdSr³rIrtrIrIrJrVsrcCsD|dkr$t |¡\}}t|||ƒ}n|dkr8t||ƒ}ntdƒ‚|S)NrOrNzmust be block or integer type)r†Z
get_blocksr rr^)r¢r¹r„ZlocsZlensrŠrIrIrJr[s )N)rONN)€rlÚ
__future__rÚ collectionsrrrr`Útypingrrrrrr    r
r r§ÚnumpyrZZ pandas._libsr Zpandas._libs.sparseZ_libsÚsparser†r rrZpandas._libs.tslibsrZpandas._typingrrrrrrrrrrrZpandas.compat.numpyrr7Z pandas.errorsrZpandas.util._exceptionsrZpandas.util._validatorsrr Zpandas.core.dtypes.astyper!Zpandas.core.dtypes.castr"r#r$Zpandas.core.dtypes.commonr%r&r'r(r)r*r+r,r-r.r/Zpandas.core.dtypes.genericr0r1Zpandas.core.dtypes.missingr2r3r4Z pandas.corer5r6Zpandas.core.algorithmsÚcoreZ
algorithmsrêZpandas.core.arrayliker7Zpandas.core.arraysr8Zpandas.core.arrays.sparse.dtyper9Zpandas.core.baser:Zpandas.core.commonÚcommonrZpandas.core.constructionr;r<r=Zpandas.core.indexersr>r?Zpandas.core.missingr@Zpandas.core.nanopsrAZpandas.io.formatsrBÚenumrCrDrHZ scipy.sparserKrLrMršrôrPr rQZ_sparray_doc_kwargsr_rŒr‡rRr«rrIrIrIrJÚ<module>sŠ  (
  4    4           mÿ|ü>