小编jjr*_*jrr的帖子

astype 熊猫上的错误?

我正在使用 timedeltas,似乎这段代码

copy_for_U.Time.astype('timedelta64[m]',copy=False);

不会更改数据框 - 如果我从文档中正确理解,它应该如此,它说:

Signature: full_df.Time.astype(dtype, copy=True, raise_on_error=True, **kwargs) Docstring: Cast object to input numpy.dtype Return a copy when copy = True (be really careful with this!)

python numpy timedelta pandas

6
推荐指数
1
解决办法
636
查看次数

jupyter ImportError:无法从部分初始化的模块“zmq.backend.cython”导入名称“常量”

我最近升级了jupyter,但现在我得到了

ImportError: cannot import name 'constants' from partially initialized module 'zmq.backend.cython'
Run Code Online (Sandbox Code Playgroud)

例如,当我跑步jupyter-notebookjupyter notebook

pip install --upgrade pyzmq没有解决问题

任何想法?

谢谢

ps:我使用的是 Mac OS 10.15.5 ,其中jupyter --v

jupyter core     : 4.6.3
jupyter-notebook : 6.0.3
qtconsole        : 4.5.5
ipython          : 8.0.0.dev
ipykernel        : not installed
jupyter client   : not installed
jupyter lab      : 1.2.3
nbconvert        : 5.6.1
ipywidgets       : not installed
nbformat         : 5.0.4
traitlets        : 4.3.3
Run Code Online (Sandbox Code Playgroud)

jupyter

6
推荐指数
1
解决办法
8439
查看次数

在 3d 图的轴标签中添加换行符 –plotly

按照另一篇文章 \xe2\x80\x93 中的建议插入<br>轴标签\xe2\x80\x93 在3d 图中不起作用

\n\n

有什么建议么?

\n\n

谢谢

\n\n

ps:这就是 3d 绘图的代码的样子

\n\n
layout = go.Layout(\ntitle=\'my_title\',\nscene=dict(\n    xaxis=dict(\n        title=\'x_title\' + \'<br>\' + \'at new line\',\n        titlefont=dict(\n            size=18\n        )\n    ),\n    yaxis=dict(\n        title=\'y_title\' + \'<br>\' + \'at new line\',\n        titlefont=dict(\n            size=18\n        )\n    ),\n    zaxis=dict(\n        title=\'z_title\' + \'<br>\' + \'at new line\',\n        titlefont=dict(\n            size=18\n        )\n    )\n)\n
Run Code Online (Sandbox Code Playgroud)\n

python plotly

5
推荐指数
0
解决办法
2427
查看次数

ValueError:不支持的pickle协议:4个带有pandas

我收到这个错误

ValueError: unsupported pickle protocol: 4
Run Code Online (Sandbox Code Playgroud)

从我的代码行

full_df = pd.read_pickle('df_userID.pickle')
Run Code Online (Sandbox Code Playgroud)

使用python2.7运行脚本时

(在Ubuntu 14.04.5上,3.13.0-95-通用)

感谢帮助.

python pickle python-2.7 pandas

4
推荐指数
1
解决办法
5686
查看次数

无法安装 R 包:CMake errorr

我正在尝试安装factoextra,但在 CMake 部分遇到了困难,特别是出现如下错误:

\n

CMake Error: The source directory "/tmp/..." does not exist.

\n

(当我尝试安装其依赖项时也是如此nloptrpbkrtest,,,,,,,,, )lme4carrstatixFactoMineRggpubr

\n

任何想法?

\n

谢谢

\n

附:

\n
    \n
  • R版本4.0.0
  • \n
  • 分体7
  • \n
\n

日志的最后一部分:

\n
CMake Error: The source directory "/tmp/RtmpgJySdf/R.INSTALL20c31df42f6/nloptr/src/nlopt-build" does not exist.\nSpecify --help for usage, or press the help button on the CMake GUI.\nUnknown argument -j\nUnknown argument 2\nUsage: cmake --build <dir> [options] [-- [native-options]]\nOptions:\n  <dir>          = Project binary directory to be …
Run Code Online (Sandbox Code Playgroud)

r cmake

3
推荐指数
1
解决办法
5409
查看次数

标签 统计

python ×3

pandas ×2

cmake ×1

jupyter ×1

numpy ×1

pickle ×1

plotly ×1

python-2.7 ×1

r ×1

timedelta ×1