Create an independent copy of any object, function etc.
pip install copy-functions-and-more
from copy_functions_and_more import copy_func
import pandas as pd
df = pd.read_csv( "https://github.com/pandas-dev/pandas/raw/main/doc/data/titanic.csv")
copieddescribe = copy_func(df.describe)
print(copieddescribe())
copy_func(df.__str__)
strco=copy_func(df.__str__)
print(strco())
print(copieddescribe is df.describe)
print(copieddescribe == df.describe)
print(strco is df.__str__)
print(strco == df.__str__)
PassengerId Survived Pclass ... SibSp Parch Fare
count 891.000000 891.000000 891.000000 ... 891.000000 891.000000 891.000000
mean 446.000000 0.383838 2.308642 ... 0.523008 0.381594 32.204208
std 257.353842 0.486592 0.836071 ... 1.102743 0.806057 49.693429
min 1.000000 0.000000 1.000000 ... 0.000000 0.000000 0.000000
25% 223.500000 0.000000 2.000000 ... 0.000000 0.000000 7.910400
50% 446.000000 0.000000 3.000000 ... 0.000000 0.000000 14.454200
75% 668.500000 1.000000 3.000000 ... 1.000000 0.000000 31.000000
max 891.000000 1.000000 3.000000 ... 8.000000 6.000000 512.329200
[8 rows x 7 columns]
PassengerId Survived Pclass ... Fare Cabin Embarked
0 1 0 3 ... 7.2500 NaN S
1 2 1 1 ... 71.2833 C85 C
2 3 1 3 ... 7.9250 NaN S
3 4 1 1 ... 53.1000 C123 S
4 5 0 3 ... 8.0500 NaN S
.. ... ... ... ... ... ... ...
886 887 0 2 ... 13.0000 NaN S
887 888 1 1 ... 30.0000 B42 S
888 889 0 3 ... 23.4500 NaN S
889 890 1 1 ... 30.0000 C148 C
890 891 0 3 ... 7.7500 NaN Q
[891 rows x 12 columns]
False
False
False
False
newlist=[33354,442,4535,333]
newlist2=copy_func(newlist)
print(newlist2 is newlist)
print(newlist2 == newlist)
False
True
Metadata
Release files for copy-functions-and-more 0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| copy_functions_and_more-0.10.tar.gz | 3.9 kB | Without provenance | Details for copy_functions_and_more-0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| copy_functions_and_more-0.10-py3-none-any.whl | Python 3 | none | any | Details for copy_functions_and_more-0.10-py3-none-any.whl |
Total release size: 9.6 kB
Release files / copy_functions_and_more-0.10.tar.gz
| Download URL | copy_functions_and_more-0.10.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
90cf2bf20cdd23e933e40cc0a363482ab2fd7aab825cb821d0731a97b8d72aaf
|
|
BLAKE2b-256 checksum How to use checksums |
ec02d8780bd8789b9bc2d4e46f767245fa1ecd8429faae433ed353bc858b5fec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / copy_functions_and_more-0.10-py3-none-any.whl
| Download URL | copy_functions_and_more-0.10-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bb435771616b3bcd5eae6b286a12879dc8c980cae9dd5655ba99af5b8bbb4f09
|
|
BLAKE2b-256 checksum How to use checksums |
2fd7126657593f6a723ce6fea8ea4c6959d56c428a484db7826b43184374f2c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for copy-functions-and-more 0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.