我正在尝试安装FastAi库并将其与Google Colab一起使用.我是
使用:
!pip3 install fastai
!apt-get -qq install -y libsm6 libxext6 && pip install -q -U opencv-python
import cv2
from os import path
from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag
platform = '{}{}-{}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag())
accelerator = 'cu80' if path.exists('/opt/bin/nvidia-smi') else 'cpu'
!pip install -q http://download.pytorch.org/whl/{accelerator}/torch-0.3.0.post4-{platform}-linux_x86_64.whl torchvision
import torch
!pip install Pillow==4.1.1
!pip install image
%matplotlib inline
Run Code Online (Sandbox Code Playgroud)
导入/安装一切,但是当我运行时
from fastai.imports import *
Run Code Online (Sandbox Code Playgroud)
最后一行给出的错误如下:
ImportError:无法导入名称'as_tensor'
有没有人知道我做错了什么/为什么它是第一件安装时不导入fastai库?
我收到的完整错误如下:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-10-9f9378ae0f2a> in <module>()
----> 1 from fastai.imports …Run Code Online (Sandbox Code Playgroud) 我在pandas数据框中有一个格式为的列
f1 d3 a4 0a d0 6a 4b 4a 83 d4 4f c9 1f 15 11 17
我想将它转换为:
f1d3a40a-d06a-4b4a-83d4-4fc91f151117
我知道我可以replace(" ", "")用来取出空白,但我不知道如何在我需要的确切位置插入连字符.
我也不知道如何将它应用于pandas系列对象.
任何帮助,将不胜感激!