小编tev*_*ang的帖子

为收集到的包裹构建轮子非常缓慢并且需要内存。我可以跳过吗?

我的项目有这个 setup.py 文件,我正在使用 Python3.7 运行 Anaconda3:

from setuptools import setup, find_packages
from setuptools.command.install import install as InstallCommand


def parse_requirements(requirements):
    with open(requirements) as f:
        return [l.strip('\n') for l in f if l.strip('\n') and not l.startswith('#')]


class Install(InstallCommand):
    """ Customized setuptools install command which uses pip. """

    def run(self, *args, **kwargs):
        from pip._internal import main as _main
        _main(['install', '.'])
        InstallCommand.run(self, *args, **kwargs)


setup(
    name="NGF",
    author="Ties van Rozendaal",
    author_email="git@tivaro.nl",
    maintainer="Thomas Evangelidis",
    maintainer_email="tevang3@gmail.com",
    description="\n*** An implementation of Convolutional Networks on Graphs for Learning Molecular …
Run Code Online (Sandbox Code Playgroud)

python installation pip setup.py

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

如何在多索引熊猫数据框中选择嵌套列

我创建了一个 3D Pandas 数据框,如下所示:

A=  ['ECFP', 'ECFP', 'ECFP', 'FCFP', 'FCFP', 'FCFP', 'RDK5', 'RDK5', 'RDK5']

B = ['R', 'tau', 'RMSEc', 'R', 'tau', 'RMSEc', 'R', 'tau', 'RMSEc']

C = array([[ 0.1 ,  0.3 ,  0.5 ,   nan,  0.6 ,  0.4 ],
       [ 0.4 ,  0.3 ,  0.3 ,   nan,  0.4 ,  0.3 ],
       [ 1.2 ,  1.3 ,  1.1 ,   nan,  1.5 ,  1.  ],
       [ 0.4 ,  0.3 ,  0.4 ,  0.8 ,  0.1 ,  0.2 ],
       [ 0.2 ,  0.3 …
Run Code Online (Sandbox Code Playgroud)

python indexing multi-index dataframe pandas

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

如何从字符串中删除单引号

这是我的问题:

fpaths=os.listdir(ligand_names_list[0].replace("'", "\\'"))
OSError: [Errno 2] No such file or directory: "5-iodoindirubin-3\\'-oxime"
Run Code Online (Sandbox Code Playgroud)

有一个名为5-iodoindirubin-3'-oxime但我无法os.listdir()找到它的文件.这是我用这个线程启发的另一个尝试添加反斜杠而不转义[Python]:

fpaths=os.listdir(ligand_names_list[0].__ repr __())
OSError: [Errno 2] No such file or directory: '"5-iodoindirubin-3\'-oxime"'
Run Code Online (Sandbox Code Playgroud)

在这种情况下的问题是领先的单引号,我不知道如何删除它们.任何的想法?

python string quotes escaping listdir

0
推荐指数
1
解决办法
666
查看次数