@@ -680,23 +680,6 @@ def _dtype_to_subclass(cls, dtype: DtypeObj):
680
680
See each method's docstring.
681
681
"""
682
682
683
- @property
684
- def asi8 (self ):
685
- """
686
- Integer representation of the values.
687
-
688
- Returns
689
- -------
690
- ndarray
691
- An ndarray with int64 dtype.
692
- """
693
- warnings .warn (
694
- "Index.asi8 is deprecated and will be removed in a future version." ,
695
- FutureWarning ,
696
- stacklevel = find_stack_level (),
697
- )
698
- return None
699
-
700
683
@classmethod
701
684
def _simple_new (cls : type [_IndexT ], values , name : Hashable = None ) -> _IndexT :
702
685
"""
@@ -2451,7 +2434,6 @@ def is_boolean(self) -> bool:
2451
2434
is_object : Check if the Index is of the object dtype.
2452
2435
is_categorical : Check if the Index holds categorical data.
2453
2436
is_interval : Check if the Index holds Interval objects.
2454
- is_mixed : Check if the Index holds data with mixed data types.
2455
2437
2456
2438
Examples
2457
2439
--------
@@ -2487,7 +2469,6 @@ def is_integer(self) -> bool:
2487
2469
is_object : Check if the Index is of the object dtype.
2488
2470
is_categorical : Check if the Index holds categorical data.
2489
2471
is_interval : Check if the Index holds Interval objects.
2490
- is_mixed : Check if the Index holds data with mixed data types.
2491
2472
2492
2473
Examples
2493
2474
--------
@@ -2527,7 +2508,6 @@ def is_floating(self) -> bool:
2527
2508
is_object : Check if the Index is of the object dtype.
2528
2509
is_categorical : Check if the Index holds categorical data.
2529
2510
is_interval : Check if the Index holds Interval objects.
2530
- is_mixed : Check if the Index holds data with mixed data types.
2531
2511
2532
2512
Examples
2533
2513
--------
@@ -2567,7 +2547,6 @@ def is_numeric(self) -> bool:
2567
2547
is_object : Check if the Index is of the object dtype.
2568
2548
is_categorical : Check if the Index holds categorical data.
2569
2549
is_interval : Check if the Index holds Interval objects.
2570
- is_mixed : Check if the Index holds data with mixed data types.
2571
2550
2572
2551
Examples
2573
2552
--------
@@ -2611,7 +2590,6 @@ def is_object(self) -> bool:
2611
2590
is_numeric : Check if the Index only consists of numeric data.
2612
2591
is_categorical : Check if the Index holds categorical data.
2613
2592
is_interval : Check if the Index holds Interval objects.
2614
- is_mixed : Check if the Index holds data with mixed data types.
2615
2593
2616
2594
Examples
2617
2595
--------
@@ -2653,7 +2631,6 @@ def is_categorical(self) -> bool:
2653
2631
is_numeric : Check if the Index only consists of numeric data.
2654
2632
is_object : Check if the Index is of the object dtype.
2655
2633
is_interval : Check if the Index holds Interval objects.
2656
- is_mixed : Check if the Index holds data with mixed data types.
2657
2634
2658
2635
Examples
2659
2636
--------
@@ -2697,7 +2674,6 @@ def is_interval(self) -> bool:
2697
2674
is_numeric : Check if the Index only consists of numeric data.
2698
2675
is_object : Check if the Index is of the object dtype.
2699
2676
is_categorical : Check if the Index holds categorical data.
2700
- is_mixed : Check if the Index holds data with mixed data types.
2701
2677
2702
2678
Examples
2703
2679
--------
@@ -2712,44 +2688,6 @@ def is_interval(self) -> bool:
2712
2688
"""
2713
2689
return self .inferred_type in ["interval" ]
2714
2690
2715
- @final
2716
- def is_mixed (self ) -> bool :
2717
- """
2718
- Check if the Index holds data with mixed data types.
2719
-
2720
- Returns
2721
- -------
2722
- bool
2723
- Whether or not the Index holds data with mixed data types.
2724
-
2725
- See Also
2726
- --------
2727
- is_boolean : Check if the Index only consists of booleans.
2728
- is_integer : Check if the Index only consists of integers.
2729
- is_floating : Check if the Index is a floating type.
2730
- is_numeric : Check if the Index only consists of numeric data.
2731
- is_object : Check if the Index is of the object dtype.
2732
- is_categorical : Check if the Index holds categorical data.
2733
- is_interval : Check if the Index holds Interval objects.
2734
-
2735
- Examples
2736
- --------
2737
- >>> idx = pd.Index(['a', np.nan, 'b'])
2738
- >>> idx.is_mixed()
2739
- True
2740
-
2741
- >>> idx = pd.Index([1.0, 2.0, 3.0, 5.0])
2742
- >>> idx.is_mixed()
2743
- False
2744
- """
2745
- warnings .warn (
2746
- "Index.is_mixed is deprecated and will be removed in a future version. "
2747
- "Check index.inferred_type directly instead." ,
2748
- FutureWarning ,
2749
- stacklevel = find_stack_level (),
2750
- )
2751
- return self .inferred_type in ["mixed" ]
2752
-
2753
2691
@final
2754
2692
def holds_integer (self ) -> bool :
2755
2693
"""
@@ -5312,18 +5250,6 @@ def _is_memory_usage_qualified(self) -> bool:
5312
5250
"""
5313
5251
return self .is_object ()
5314
5252
5315
- def is_type_compatible (self , kind : str_t ) -> bool :
5316
- """
5317
- Whether the index type is compatible with the provided type.
5318
- """
5319
- warnings .warn (
5320
- "Index.is_type_compatible is deprecated and will be removed in a "
5321
- "future version." ,
5322
- FutureWarning ,
5323
- stacklevel = find_stack_level (),
5324
- )
5325
- return kind == self .inferred_type
5326
-
5327
5253
def __contains__ (self , key : Any ) -> bool :
5328
5254
"""
5329
5255
Return a boolean indicating whether the provided key is in the index.
0 commit comments