Python
Nooooora
硕士毕业生 请多多交流
展开
-
数据分析可视化库——ydata_profiling
【代码】数据分析可视化库——ydata_profiling。原创 2024-10-25 17:10:52 · 165 阅读 · 0 评论 -
Cannot uninstall ‘llvmlite‘
【代码】Cannot uninstall ‘llvmlite‘原创 2024-01-04 15:29:31 · 578 阅读 · 0 评论 -
TypeError: doc2bow expects an array of unicode tokens on input, not a single string
【代码】TypeError: doc2bow expects an array of unicode tokens on input, not a single string。原创 2023-05-17 11:39:07 · 387 阅读 · 0 评论 -
dataframe中,使用字典映射匹配部分字符串
dataframe中,使用字典映射匹配部分字符串原创 2022-06-09 17:11:21 · 520 阅读 · 0 评论 -
AttributeError: ‘Rectangle‘ object has no property ‘normed‘报错解决方案
错误:python运行代码绘图:plt.hist(data[col], normed=True, alpha=0.5)报错:AttributeError: 'Rectangle' object has no property 'normed'解决方案:normed库已更新无法使用,替换为density即可:plt.hist(data[col], density=True, alpha=0.5)...原创 2022-04-20 10:31:49 · 3288 阅读 · 0 评论 -
eps值计算
eps是最小的正 64 位浮点数,使得 1 + eps ≠ 1。该值为 2⁻⁵² ≈ 2.22e-16。import numpy as npepsilon = np.finfo(np.float64).eps原创 2022-03-02 15:26:10 · 928 阅读 · 0 评论 -
在Anaconda中更新numpy
1. 进入Anaconda环境2. 输入指令:conda update numpy原创 2022-02-22 15:36:48 · 6448 阅读 · 0 评论 -
ERROR: Cannot uninstall ‘PyYAML‘. It is a distutils installed project and thus we cannot accurately
在Ubuntu安装transformers的时候,出现错误: Attempting uninstall: pyyaml Found existing installation: PyYAML 3.12ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would ...原创 2022-02-22 15:12:09 · 1056 阅读 · 0 评论 -
FileNotFoundError: [Errno 2] “dot“ not found in path
问题:安装了‘pydot’,且‘import pydot’,出现如上错误。解决:运行‘dot -V‘,查看结果,若‘zsh: command not found: dot’,则需要安装‘graphviz‘。brew install graphviz原创 2022-02-10 09:25:12 · 806 阅读 · 0 评论 -
Paillier_Encryption 实现中英文字符串加解密
IntroductionPaillier算法原理:Code代码参考:Python实现Paillier加密解密算法 - B3ale上述代码实现了英文和数字字符串的加解密,实现中文字符串加解密需要解决中文的转码问题:中文---->encode(utf-8)---->encrypt---->decrypt---->decode(utf9)---->中文需要安装gmpy2和libnumpip install gmpy2pip install l原创 2022-01-27 14:26:38 · 1338 阅读 · 0 评论 -
[python] utf-8编码,双斜杠‘\\‘转单斜杠‘\‘
在编译中文过程, 会使用utf-8进行转码得到byte,例如'测试!'.encode('utf8'):b'\xe6\xb5\x8b\xe8\xaf\x95\xef\xbc\x81'在Python3中,有时会得到String,而不是byte:\\xe6\\xb5\\x8b\\xe8\\xaf\\x95\\xef\\xbc\\x81如果将String重新encode再decode,并不能得到原文:string.encode('utf8').decode('unicode_escape原创 2022-01-25 16:00:45 · 5119 阅读 · 1 评论 -
Win10,Anaconda (conda 4.7.12, python3.7.5),tensorflow安装
Win10操作系统,conda 4.7.12,python3.7.51.使用管理员权限,打开cmd,进入Anaconda路径D:\Anaconda3\2.Create a virtual environment$ conda create -n venv pip python=3.7 #select your python wersion$...原创 2019-12-13 18:22:31 · 2096 阅读 · 0 评论 -
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not avail
Problem:win10, python3.7.5, 使用pip在Anaconda中,install“TensorFlow”出现以下错误:pip is configured with locations that require TLS/SSL, however the ssl module in Python is not availableSolution:对于...原创 2019-12-13 17:59:54 · 375 阅读 · 0 评论 -
'conda' is not recognized as an internal or external command, operable program or batch file.
Question:Win10,Anaconda 4.7.12,执行 ‘conda --version’ 或 ‘conda list’ 命令出现错误'conda' is not recognized as an internal or external commandAnswer:Variable value should beC:\Users\Anaconda3...原创 2019-12-12 21:06:33 · 1817 阅读 · 0 评论 -
no module name 'gurobipy'
错误:成功安装gurobipy和license后,在Jupyter运行program时,出现以下错误:ModuleNotFoundError Traceback (most recent call last)<ipython-input-3-24a618edc02b> in <module>----> 1 fr...原创 2019-10-30 19:05:02 · 8316 阅读 · 7 评论