#36345 PERF: styler uuid control and security

Merged attack68 Pseudo commit used to compare (82f9a0e...b162caf)
Missing base report.

Unable to compare commits because the base of the pull request did not upload a coverage report.

Changes found in between 82f9a0e...b162caf (pseudo...base) which prevent comparing this pull request.

Showing 143 of 300 files from the diff.
Newly tracked file
pandas/io/excel/_util.py changed.
Newly tracked file
pandas/io/spss.py changed.
Newly tracked file
pandas/core/base.py changed.
Newly tracked file
pandas/io/orc.py changed.
Newly tracked file
pandas/io/html.py changed.
Newly tracked file
pandas/core/api.py changed.
Newly tracked file
pandas/io/common.py changed.
Newly tracked file
pandas/io/pytables.py changed.
Newly tracked file
pandas/core/frame.py changed.
Newly tracked file
pandas/io/parquet.py changed.
Newly tracked file
pandas/_testing.py changed.
Newly tracked file
pandas/io/excel/_xlwt.py changed.
Newly tracked file
pandas/core/index.py changed.
Newly tracked file
pandas/io/json/_json.py changed.
Newly tracked file
pandas/plotting/_core.py changed.
Other files ignored by Codecov
environment.yml has changed.
.travis.yml has changed.
Makefile has changed.
ci/code_checks.sh has changed.
README.md has changed.
pandas/_typing.py has changed.
ci/build39.sh has changed.

@@ -12,7 +12,7 @@
Loading
12 12
13 13
import numpy as np
14 14
15 -
from pandas._typing import Label
15 +
from pandas._typing import FrameOrSeriesUnion, Label
16 16
from pandas.util._decorators import Appender, Substitution
17 17
18 18
from pandas.core.dtypes.cast import maybe_downcast_to_dtype
@@ -200,7 +200,7 @@
Loading
200 200
201 201
202 202
def _add_margins(
203 -
    table: Union["Series", "DataFrame"],
203 +
    table: FrameOrSeriesUnion,
204 204
    data,
205 205
    values,
206 206
    rows,
@@ -239,7 +239,7 @@
Loading
239 239
240 240
    elif values:
241 241
        marginal_result_set = _generate_marginal_results(
242 -
            table, data, values, rows, cols, aggfunc, observed, margins_name,
242 +
            table, data, values, rows, cols, aggfunc, observed, margins_name
243 243
        )
244 244
        if not isinstance(marginal_result_set, tuple):
245 245
            return marginal_result_set
@@ -308,7 +308,7 @@
Loading
308 308
309 309
310 310
def _generate_marginal_results(
311 -
    table, data, values, rows, cols, aggfunc, observed, margins_name: str = "All",
311 +
    table, data, values, rows, cols, aggfunc, observed, margins_name: str = "All"
312 312
):
313 313
    if len(cols) > 0:
314 314
        # need to "interleave" the margins

@@ -253,11 +253,17 @@
Loading
253 253
    # -----------------------------------------------------------------
254 254
    # DatetimeLike Interface
255 255
256 -
    def _unbox_scalar(self, value: Union[Period, NaTType]) -> int:
256 +
    @classmethod
257 +
    def _rebox_native(cls, value: int) -> np.int64:
258 +
        return np.int64(value)
259 +
260 +
    def _unbox_scalar(
261 +
        self, value: Union[Period, NaTType], setitem: bool = False
262 +
    ) -> int:
257 263
        if value is NaT:
258 264
            return value.value
259 265
        elif isinstance(value, self._scalar_type):
260 -
            self._check_compatible_with(value)
266 +
            self._check_compatible_with(value, setitem=setitem)
261 267
            return value.ordinal
262 268
        else:
263 269
            raise ValueError(f"'value' should be a Period. Got '{value}' instead.")
@@ -480,9 +486,8 @@
Loading
480 486
            values[self._isnan] = iNaT
481 487
        return type(self)(values, freq=self.freq)
482 488
483 -
    @property
484 -
    def _box_func(self):
485 -
        return lambda x: Period._from_ordinal(ordinal=x, freq=self.freq)
489 +
    def _box_func(self, x) -> Union[Period, NaTType]:
490 +
        return Period._from_ordinal(ordinal=x, freq=self.freq)
486 491
487 492
    def asfreq(self, freq=None, how: str = "E") -> "PeriodArray":
488 493
        """
@@ -582,6 +587,13 @@
Loading
582 587
            return self.asfreq(dtype.freq)
583 588
        return super().astype(dtype, copy=copy)
584 589
590 +
    def searchsorted(self, value, side="left", sorter=None):
591 +
        value = self._validate_searchsorted_value(value).view("M8[ns]")
592 +
593 +
        # Cast to M8 to get datetime-like NaT placement
594 +
        m8arr = self._ndarray.view("M8[ns]")
595 +
        return m8arr.searchsorted(value, side=side, sorter=sorter)
596 +
585 597
    # ------------------------------------------------------------------
586 598
    # Arithmetic Methods
587 599
@@ -634,7 +646,7 @@
Loading
634 646
        return new_values
635 647
636 648
    def _addsub_int_array(
637 -
        self, other: np.ndarray, op: Callable[[Any, Any], Any],
649 +
        self, other: np.ndarray, op: Callable[[Any, Any], Any]
638 650
    ) -> "PeriodArray":
639 651
        """
640 652
        Add or subtract array of integers; equivalent to applying

@@ -81,9 +81,7 @@
Loading
81 81
    unstacked : DataFrame
82 82
    """
83 83
84 -
    def __init__(
85 -
        self, index: MultiIndex, level=-1, constructor=None,
86 -
    ):
84 +
    def __init__(self, index: MultiIndex, level=-1, constructor=None):
87 85
88 86
        if constructor is None:
89 87
            constructor = DataFrame
@@ -422,7 +420,7 @@
Loading
422 420
        if is_extension_array_dtype(obj.dtype):
423 421
            return _unstack_extension_series(obj, level, fill_value)
424 422
        unstacker = _Unstacker(
425 -
            obj.index, level=level, constructor=obj._constructor_expanddim,
423 +
            obj.index, level=level, constructor=obj._constructor_expanddim
426 424
        )
427 425
        return unstacker.get_result(
428 426
            obj.values, value_columns=None, fill_value=fill_value
@@ -436,7 +434,7 @@
Loading
436 434
        return obj._constructor(mgr)
437 435
    else:
438 436
        return _Unstacker(
439 -
            obj.index, level=level, constructor=obj._constructor,
437 +
            obj.index, level=level, constructor=obj._constructor
440 438
        ).get_result(obj._values, value_columns=obj.columns, fill_value=fill_value)
441 439
442 440
@@ -588,19 +586,15 @@
Loading
588 586
    def _convert_level_number(level_num, columns):
589 587
        """
590 588
        Logic for converting the level number to something we can safely pass
591 -
        to swaplevel:
589 +
        to swaplevel.
592 590
593 -
        We generally want to convert the level number into a level name, except
594 -
        when columns do not have names, in which case we must leave as a level
595 -
        number
591 +
        If `level_num` matches a column name return the name from
592 +
        position `level_num`, otherwise return `level_num`.
596 593
        """
597 594
        if level_num in columns.names:
598 595
            return columns.names[level_num]
599 -
        else:
600 -
            if columns.names[level_num] is None:
601 -
                return level_num
602 -
            else:
603 -
                return columns.names[level_num]
596 +
597 +
        return level_num
604 598
605 599
    this = frame.copy()
606 600
@@ -766,8 +760,6 @@
Loading
766 760
    dtype : dtype, default np.uint8
767 761
        Data type for new columns. Only a single dtype is allowed.
768 762
769 -
        .. versionadded:: 0.23.0
770 -
771 763
    Returns
772 764
    -------
773 765
    DataFrame

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Unable to process changes.

No base report to compare against.

250 Commits

+10
+8
+2
Hiding 21 contexual commits
-40
-27
-13
Hiding 1 contexual commits
-1
-2
+1
Hiding 10 contexual commits
+3
-1
+4
Hiding 5 contexual commits
+14
+12
+2
Hiding 2 contexual commits
-2
-2