-
-
Notifications
You must be signed in to change notification settings - Fork 17.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: overriden methods of subclasses of Styler are not called during rendering #52728
Comments
Thanks for the report. I can't remember the reason for the PRs welcome. |
take |
BUG: overriden methods of subclasses of Styler are not called during rendering pandas-dev#52728
…rendering pandas-dev#52728 BUG: overriden methods of subclasses of Styler are not called during rendering pandas-dev#52728
please give me this issue to solve |
…rendering pandas-dev#52728 BUG: overriden methods of subclasses of Styler are not called during rendering pandas-dev#52728
…rendering pandas-dev#52728 BUG: overriden methods of subclasses of Styler are not called during rendering pandas-dev#52728
@anshuman0123, @nicklausroach has already written "take" and the issue was automatically assigned to him. Please be aware of the community and be respectful towards that system. If Nicklaus doesn't follow up or drops the issue he can always unassign himself from this task. |
…rendering pandas-dev#52728 BUG: overriden methods of subclasses of Styler are not called during rendering pandas-dev#52728
…rendering pandas-dev#52728 BUG: overriden methods of subclasses of Styler are not called during rendering pandas-dev#52728
…rendering pandas-dev#52728 BUG: overriden methods of subclasses of Styler are not called during rendering pandas-dev#52728
…rendering pandas-dev#52728 BUG: overriden methods of subclasses of Styler are not called during rendering pandas-dev#52728
…rendering pandas-dev#52728 BUG: overriden methods of subclasses of Styler are not called during rendering pandas-dev#52728
…rendering pandas-dev#52728 (pandas-dev#52919) * use type() instead of __class__ * add test * remove unnecessary file * typo * revert change to class method --------- Co-authored-by: Nicklaus Roach <nicklausroach@MacBook-Pro.home> Co-authored-by: Nicklaus Roach <nicklausroach@MacBook-Pro-2.local>
…rendering pandas-dev#52728 (pandas-dev#52919) * use type() instead of __class__ * add test * remove unnecessary file * typo * revert change to class method --------- Co-authored-by: Nicklaus Roach <nicklausroach@MacBook-Pro.home> Co-authored-by: Nicklaus Roach <nicklausroach@MacBook-Pro-2.local>
…rendering pandas-dev#52728 (pandas-dev#52919) * use type() instead of __class__ * add test * remove unnecessary file * typo * revert change to class method --------- Co-authored-by: Nicklaus Roach <nicklausroach@MacBook-Pro.home> Co-authored-by: Nicklaus Roach <nicklausroach@MacBook-Pro-2.local>
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
rendering behaviour of Styler can't be customised by users, because internally Styler.render methods use ._copy to get a copy of the Styler that some internal changes are then applied to
This could be worked around by turning ._copy into a classmethod e.g. Styler._copy(cls, self) which returns a copy with the same type as self
Expected Behavior
type(CustomStyler(data)._copy()) == CustomStyler
Installed Versions
INSTALLED VERSIONS
commit : 478d340
python : 3.8.10.final.0
python-bits : 64
OS : Linux
OS-release : 5.15.0-69-generic
Version : #76~20.04.1-Ubuntu SMP Mon Mar 20 15:54:19 UTC 2023
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_GB.UTF-8
LOCALE : en_GB.UTF-8
pandas : 2.0.0
numpy : 1.22.0
pytz : 2021.3
dateutil : 2.8.2
setuptools : 56.0.0
pip : 21.1.1
Cython : None
pytest : 6.2.5
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : 3.0.2
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.0.3
IPython : 7.31.0
pandas_datareader: None
bs4 : None
bottleneck : None
brotli : None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : 3.0.9
pandas_gbq : None
pyarrow : None
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : None
snappy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : 2.0.1
zstandard : None
tzdata : 2023.3
qtpy : None
pyqt5 : None
The text was updated successfully, but these errors were encountered: