精华内容
下载资源
问答
  • windows下安装pandas

    2016-01-14 16:53:00
    windows下安装pandas,除了安装pandas外,还需把用到的相关包都装上,共需要安装如下包: pyparsing-2.0.7-py2.py3-none-any.whl matplotlib-1.5.1-cp27-none-win32.whl openpyxl-2.3.2-py2.py3-none-any....

    在windows下安装pandas,除了安装pandas外,还需把用到的相关包都装上,共需要安装如下包:

    pyparsing-2.0.7-py2.py3-none-any.whl

    matplotlib-1.5.1-cp27-none-win32.whl
    openpyxl-2.3.2-py2.py3-none-any.whl

    setuptools-19.2-py2.py3-none-any.whl

     

    numpy-1.10.4+mkl-cp27-none-win32.whl

    six-1.10.0-py2.py3-none-any.whl

    python_dateutil-2.4.2-py2.py3-none-any.whl

    这些安装包的下载地址是:
    http://www.lfd.uci.edu/~gohlke/pythonlibs

    如果搜不到原包,只要是这个模块就行

    pip install  模块名

    ****************************************************************************************************************

    numpy

    import numpy as np
    In [16]: data2 = [[1, 2, 3, 4], [5, 6, 7, 8]]
    In [17]: arr2 = np.array(data2)
    In [18]: arr2
    Out[18]:array([[1, 2, 3, 4],
    [5, 6, 7, 8]])
    查看长度,结构,数据类型dtype
    In [19]: arr2.ndim
    Out[19]: 2
    In [20]: arr2.shape
    Out[20]: (2, 4)
    In [21]: arr2.dtype
    
    改变dtype
    In [38]: numeric_strings = np.array(['1.25', '-9.6', '42'], dtype=np.string_)
    In [39]: numeric_strings.astype(float)
    Out[39]: array([ 1.25, -9.6 , 42. ])
    
    In [57]: arr_slice = arr[5:8]
    In [58]: arr_slice[1] = 12345
    In [59]: arr
    Out[59]: array([ 0, 1, 2, 3, 4, 12, 12345, 12, 8, 9])
    
    
    In [140]: xarr = np.array([1.1, 1.2, 1.3, 1.4, 1.5])
    In [141]: yarr = np.array([2.1, 2.2, 2.3, 2.4, 2.5])
    In [142]: cond = np.array([True, False, True, True, False])
    假如我们想要当对应的 cond 值为 True 时,从 xarr 中获取一个值,否则从 yarr 中获取值
    In [145]: result = np.where(cond, xarr, yarr)
    In [146]: result
    Out[146]: array([ 1.1, 2.2, 1.3, 1.4, 2.5])
    np.where 的第一个和第二个参数不需要是数组;它们中的一个或两个可以是纯量。 在数据分析中 where 的典型使用是生成一个新的数组,其值基于另一个数组。假如你有一个矩阵,其数据是随机生成的,你想要把其中的正值替换为2,负值替换为-2,使用 np.where 非常容易:
    In [147]: arr = randn(4, 4)
    In [148]: arr
    Out[148]:
    array([[ 0.6372, 2.2043, 1.7904, 0.0752],
           [-1.5926, -1.1536, 0.4413, 0.3483],
           [-0.1798, 0.3299, 0.7827, -0.7585],
           [ 0.5857, 0.1619, 1.3583, -1.3865]])
    In [149]: np.where(arr > 0, 2, -2)
    Out[149]:
    array([[ 2, 2, 2, 2],
           [-2, -2, 2, 2],
           [-2, 2, 2, -2],
           [ 2, 2, 2, -2]])
    
    In [150]: np.where(arr > 0, 2, arr) # 仅设置正值为 2
    Out[150]:
    array([[ 2. , 2. , 2. , 2. ],
           [-1.5926, -1.1536, 2. , 2. ],
           [-0.1798, 2. , 2. , -0.7585],
           [ 2. , 2. , 2. , -1.3865]])

     

    pandas---应用

    In [1]: from pandas import Series, DataFrame
    In [2]: import pandas as pd

    Series

    列表建立(index长度和列表长度必须一样)

    In [8]: obj2 = Series([4, 7, -5, 3], index=['d', 'b', 'a', 'c'])

    字典建立(index可以是字典的部分key)

    In [20]: sdata = {'Ohio': 35000, 'Texas': 71000, 'Oregon': 16000, 'Utah': 5000}
    In [21]: obj3 = Series(sdata,index=['Ohio','Texas'])

    检索

    In [11]: obj2['a']
    Out[11]: -5
    In [12]: obj2['d'] = 6
    In [13]: obj2[['c', 'a', 'd']] #比列表多一项
    In [13]: obj2['a':'d'] #包括结束点d
    In [15]: obj2[obj2 > 0]  
    In [16]: obj2 * 2
    In [17]: np.exp(obj2)
    In [18]: 'b' in obj2  #字典的性质
    Out[18]: True
    In [19]: 'e' in obj2
    Out[19]: False
    In[69]: for i in obj3:
    ...         print i
    ...         
    35000     #输出值并非索引
    71000

    改变索引

     obj.index = ['Bob', 'Steve', 'Jeff', 'Ryan'] #只能以列表的形式改变,不能是obj.index[1]='b'单独改变
     
    改变索引长度及值
    In [81]: obj2 = obj.reindex(['a', 'b', 'c', 'd', 'e'])
    In [82]: obj2
    Out[82]:
    a -5.3
    b 7.2
    c 3.6
    d 4.5
    e NaN
    In [83]: obj.reindex(['a', 'b', 'c', 'd', 'e'], fill_value=0)
    Out[83]:
    a -5.3
    b 7.2
    c 3.6
    d 4.5
    e 0.0

    检索

    DataFrame

    列表建立(index长度和列表长度必须一样,columns可多可少)

    data = {'state': ['Ohio', 'Ohio', 'Ohio', 'Nevada', 'Nevada'],
            'year': [2000, 2001, 2002, 2001, 2002],
            'pop': [1.5, 1.7, 3.6, 2.4, 2.9]}
    In [40]: frame2 = DataFrame(data, columns=['year', 'state', 'pop', 'debt'],
       ....: index=['one', 'two', 'three', 'four', 'five'])
    In [41]: frame2
    Out[41]:
           year state   pop debt
    one    2000 Ohio    1.5  NaN
    two    2001 Ohio    1.7  NaN
    three  2002 Ohio    3.6  NaN
    four   2001 Nevada  2.4  NaN
    five   2002 Nevada  2.9  NaN

    字典建立(index可以是字典的部分key)

     

    In [57]: pop = {'Nevada': {2001: 2.4, 2002: 2.9},
       ....: 'Ohio': {2000: 1.5, 2001: 1.7, 2002: 3.6}}
    In [58]: frame3 = DataFrame(pop)
    Out[87]: 
          Nevada  Ohio
    2000     NaN   1.5
    2001     2.4   1.7
    2002     2.9   3.6

     

    检索:

     

    columns检索
    In [43]: frame2['state'] In [44]: frame2.year 
    frame2[['state','year']] 
    index检索
    In [45]: frame2.ix['three']
    frame2[:2]
    In[106]: frame2.ix[['one','two']]
    按index的'one','two'索引 ,选取columns的前两个
    In[105]: frame2.ix[['one','two'],:2]
    Out[105]: 
         year state
    one  2000  Ohio
    two  2001  Ohio
    按index的'one','two'索引 ,选取columns的pop列
    In[107]: frame2.ix[['one','two'],'pop']
    按index的'one','two'索引 ,选取columns的1,2,3列
    In[108]: frame2.ix[['one','two'],[1,2,3]]
    In[109]: frame2.ix[['one','two'],['state','pop','debt']]
    Out[108/109]: 
        state  pop  debt
    one  Ohio  1.5     0
    two  Ohio  1.7     0
    
    In[110]: frame2.ix['three',['state','pop','debt']]
    按index的'one','two''three'索引 ,选取columns的1,2,3列
    In[111]: frame2.ix[:'three',['state','pop','debt']]
    Out[111]: 
          state  pop  debt
    one    Ohio  1.5     0
    two    Ohio  1.7     0
    three     0  0.0     0
    
    In[104]: frame2.ix[frame2['pop']>0,:2] 
    Out[104]: 
          year   state
    one   2000    Ohio
    two   2001    Ohio
    four  2001  Nevada
    
    
    联合检索:
    frame3['Nevada'][:2]
    
    函数检索(frame3不会改变)
    
    In[88]: frame3.drop(2000) 
    Out[88]: 
          Nevada  Ohio
    2001     2.4   1.7
    2002     2.9   3.6
    In[89]: frame3.drop('Ohio',axis=1)#
    Out[89]: 
          Nevada
    2000     NaN
    2001     2.4
    2002     2.9
    
    条件检索
    In[94]: frame2[frame2['year']>2001]
    Out[94]: 
           year   state  pop  debt
    three  2002    Ohio  3.6     0
    five   2002  Nevada  2.9     0

     

    改变一列:

    In [46]: frame2['debt'] = 16.5
    In [48]: frame2['debt'] = range(5)
    该表一列的某些值
    In [50]: val = Series([-1.2, -1.5, -1.7], index=['two', 'four', 'five'])
    In [51]: frame2['debt'] = val
    随即改变
    frame2[frame2['year']>2001]=0
    添加一列:
    In[46]: frame2['gyf']=[1,2,3,4,5]
    In[70]: del frame2['gyf']

     

    改变索引

    In [86]: frame = DataFrame(np.arange(9).reshape((3, 3)), index=['a', 'c', 'd'],
    ....: columns=['Ohio', 'Texas', 'California'])
    In [87]: frame
    Out[87]:
      Ohio Texas California
    a    0     1          2
    c    3     4          5
    d    6     7          8
    改变index
    In [88]: frame2 = frame.reindex(['a', 'b', 'c', 'd'])
    In [89]: frame2
    Out[89]:
      Ohio Texas California
    a    0     1          2
    b  NaN   NaN        NaN
    c    3     4          5
    d    6     7          8
    改变columns索引:
    In [90]: states = ['Texas', 'Utah', 'California']
    In [91]: frame.reindex(columns=states)
    Out[91]:
       Texas Utah California
    a      1  NaN          2
    c      4  NaN          5
    d      7  NaN          8
    In [92]: frame.reindex(index=['a', 'b', 'c', 'd'], method='ffill',
       ....: columns=states)
    Out[92]:
       Texas Utah California
    a      1  NaN          2
    b      1  NaN          2
    c      4  NaN          5
    d      7  NaN          8

     

    转置:

    In [60]: frame3.T

    前后向填充(ffill,bfill)

     

    In [84]: obj3 = Series(['blue', 'purple', 'yellow'], index=[0, 2, 4])
    In [85]: obj3.reindex(range(6), method='ffill')
    Out[85]:
    0   blue
    1   blue
    2 purple
    3 purple
    4 yellow
    5 yellow

     

      更多信息关注博主:http://my.oschina.net/lionets/blog 的DA & ML系列文章

     

    转载于:https://my.oschina.net/u/1458120/blog/602494

    展开全文
  • Windows7安装Pandas踩过的坑 安装Pandas要素:一台网速好的windows7系统的电脑(网速慢也会报错),安装Python3.7.3,最好使用指令安装install -i https://pypi.tuna.tsinghua.edu.cn/simple pandas(如果是离线...

    Windows7安装Pandas踩过的坑

    安装Pandas要素:一台网速好的windows7系统的电脑(网速慢也会报错),安装Python3.7.3,最好使用指令安装install -i https://pypi.tuna.tsinghua.edu.cn/simple pandas(如果是离线安装pandas版本和numpy版本不一致也会安装失败)。
    报错提示:
    1.You are using pip version 19.0.3, however version 20.0.2 is available.
    You should consider upgrading via the ‘python -m pip install --upgrade pip’ command.

    解决方法:重新运行一次 python -m pip install --upgrade pip

    2.raise ReadTimeoutError(self._pool, None, “Read timed out.”)
    pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Read timed out.

    (1)pip --default-timeout=100 install gevent

    (2) 如果(1)失败了,尝试一下换成国内的源:pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple pandas
    可以参考这个文章:https://www.cnblogs.com/Xingtxx/p/11747165.html

    以下贴上我的运行步骤:

    Microsoft Windows [版本 10.0.18362.175]
    (c) 2019 Microsoft Corporation。保留所有权利。
    
    C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Scripts>pip install pandas
    Collecting pandas
      Downloading https://files.pythonhosted.org/packages/69/69/c35fbbc9bec374c44e9c800e491e914a521dc3926fc6cee80d4821771295/pandas-1.0.3-cp37-cp37m-win_amd64.whl (8.7MB)
        5% |█▌                              | 440kB 3.9kB/s eta 0:34:52Exception:
    Traceback (most recent call last):
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 360, in _error_catcher
        yield
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 442, in read
        data = self._fp.read(amt)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
        data = self.__fp.read(amt)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\http\client.py", line 447, in read
        n = self.readinto(b)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\http\client.py", line 491, in readinto
        n = self.fp.readinto(b)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\socket.py", line 589, in readinto
        return self._sock.recv_into(b)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\ssl.py", line 1052, in recv_into
        return self.read(nbytes, buffer)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\ssl.py", line 911, in read
        return self._sslobj.read(len, buffer)
    socket.timeout: The read operation timed out
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\cli\base_command.py", line 179, in main
        status = self.run(options, args)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\commands\install.py", line 315, in run
        resolver.resolve(requirement_set)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\resolve.py", line 131, in resolve
        self._resolve_one(requirement_set, req)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\resolve.py", line 294, in _resolve_one
        abstract_dist = self._get_abstract_dist_for(req_to_install)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\resolve.py", line 242, in _get_abstract_dist_for
        self.require_hashes
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 334, in prepare_linked_requirement
        progress_bar=self.progress_bar
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\download.py", line 878, in unpack_url
        progress_bar=progress_bar
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\download.py", line 702, in unpack_http_url
        progress_bar)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\download.py", line 946, in _download_http_url
        _download_url(resp, link, content_file, hashes, progress_bar)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\download.py", line 639, in _download_url
        hashes.check_against_chunks(downloaded_chunks)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\utils\hashes.py", line 62, in check_against_chunks
        for chunk in chunks:
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\download.py", line 607, in written_chunks
        for chunk in chunks:
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\utils\ui.py", line 159, in iter
        for x in it:
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\download.py", line 596, in resp_read
        decode_content=False):
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 494, in stream
        data = self.read(amt=amt, decode_content=decode_content)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 459, in read
        raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\contextlib.py", line 130, in __exit__
        self.gen.throw(type, value, traceback)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 365, in _error_catcher
        raise ReadTimeoutError(self._pool, None, 'Read timed out.')
    pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
    You are using pip version 19.0.3, however version 20.0.2 is available.
    You should consider upgrading via the 'python -m pip install --upgrade pip' command.
    
    C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Scripts>python -m pip install --upgrade pip
    Collecting pip
      Downloading https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl (1.4MB)
        15% |█████                           | 225kB 5.5kB/s eta 0:03:43Exception:
    Traceback (most recent call last):
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 360, in _error_catcher
        yield
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 442, in read
        data = self._fp.read(amt)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
        data = self.__fp.read(amt)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\http\client.py", line 447, in read
        n = self.readinto(b)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\http\client.py", line 491, in readinto
        n = self.fp.readinto(b)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\socket.py", line 589, in readinto
        return self._sock.recv_into(b)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\ssl.py", line 1052, in recv_into
        return self.read(nbytes, buffer)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\ssl.py", line 911, in read
        return self._sslobj.read(len, buffer)
    socket.timeout: The read operation timed out
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\cli\base_command.py", line 179, in main
        status = self.run(options, args)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\commands\install.py", line 315, in run
        resolver.resolve(requirement_set)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\resolve.py", line 131, in resolve
        self._resolve_one(requirement_set, req)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\resolve.py", line 294, in _resolve_one
        abstract_dist = self._get_abstract_dist_for(req_to_install)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\resolve.py", line 242, in _get_abstract_dist_for
        self.require_hashes
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\operations\prepare.py", line 334, in prepare_linked_requirement
        progress_bar=self.progress_bar
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\download.py", line 878, in unpack_url
        progress_bar=progress_bar
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\download.py", line 702, in unpack_http_url
        progress_bar)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\download.py", line 946, in _download_http_url
        _download_url(resp, link, content_file, hashes, progress_bar)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\download.py", line 639, in _download_url
        hashes.check_against_chunks(downloaded_chunks)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\utils\hashes.py", line 62, in check_against_chunks
        for chunk in chunks:
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\download.py", line 607, in written_chunks
        for chunk in chunks:
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\utils\ui.py", line 159, in iter
        for x in it:
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\download.py", line 596, in resp_read
        decode_content=False):
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 494, in stream
        data = self.read(amt=amt, decode_content=decode_content)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 459, in read
        raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\contextlib.py", line 130, in __exit__
        self.gen.throw(type, value, traceback)
      File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 365, in _error_catcher
        raise ReadTimeoutError(self._pool, None, 'Read timed out.')
    pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
    You are using pip version 19.0.3, however version 20.0.2 is available.
    You should consider upgrading via the 'python -m pip install --upgrade pip' command.
    
    C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Scripts>python -m pip install --upgrade pip
    Collecting pip
      Downloading https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl (1.4MB)
        100% |████████████████████████████████| 1.4MB 16kB/s
    Installing collected packages: pip
      Found existing installation: pip 19.0.3
        Uninstalling pip-19.0.3:
          Successfully uninstalled pip-19.0.3
    Successfully installed pip-20.0.2
    
    C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Scripts>pip install pandas
    Collecting pandas
      Downloading pandas-1.0.3-cp37-cp37m-win_amd64.whl (8.7 MB)
         |███████████████                 | 4.1 MB 10 kB/s eta 0:07:12ERROR: Exception:
    Traceback (most recent call last):
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 425, in _error_catcher
        yield
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 507, in read
        data = self._fp.read(amt) if not fp_closed else b""
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
        data = self.__fp.read(amt)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\http\client.py", line 447, in read
        n = self.readinto(b)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\http\client.py", line 491, in readinto
        n = self.fp.readinto(b)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\socket.py", line 589, in readinto
        return self._sock.recv_into(b)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\ssl.py", line 1052, in recv_into
        return self.read(nbytes, buffer)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\ssl.py", line 911, in read
        return self._sslobj.read(len, buffer)
    socket.timeout: The read operation timed out
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\cli\base_command.py", line 186, in _main
        status = self.run(options, args)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\commands\install.py", line 331, in run
        resolver.resolve(requirement_set)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\legacy_resolve.py", line 177, in resolve
        discovered_reqs.extend(self._resolve_one(requirement_set, req))
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\legacy_resolve.py", line 333, in _resolve_one
        abstract_dist = self._get_abstract_dist_for(req_to_install)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\legacy_resolve.py", line 282, in _get_abstract_dist_for
        abstract_dist = self.preparer.prepare_linked_requirement(req)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 482, in prepare_linked_requirement
        hashes=hashes,
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 287, in unpack_url
        hashes=hashes,
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 159, in unpack_http_url
        link, downloader, temp_dir.path, hashes
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 303, in _download_http_url
        for chunk in download.chunks:
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\utils\ui.py", line 160, in iter
        for x in it:
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\network\utils.py", line 39, in response_chunks
        decode_content=False,
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 564, in stream
        data = self.read(amt=amt, decode_content=decode_content)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 529, in read
        raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\contextlib.py", line 130, in __exit__
        self.gen.throw(type, value, traceback)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 430, in _error_catcher
        raise ReadTimeoutError(self._pool, None, "Read timed out.")
    pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
    
    C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Scripts>pip install --default-timeout=1000 --no-cache-dir -r requirements.txt
    ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'
    
    C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Scripts>pip --default-timeout=100 install gevent
    Collecting gevent
      Downloading gevent-1.4.0-cp37-cp37m-win_amd64.whl (3.0 MB)
         |████████████████████████████████| 3.0 MB 3.9 kB/s
    WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))': /simple/cffi/
    Collecting cffi>=1.11.5; sys_platform == "win32" and platform_python_implementation == "CPython"
      Downloading cffi-1.14.0-cp37-cp37m-win_amd64.whl (176 kB)
         |████████████████████████████████| 176 kB 2.7 kB/s
    Collecting greenlet>=0.4.14; platform_python_implementation == "CPython"
      Downloading greenlet-0.4.15-cp37-cp37m-win_amd64.whl (16 kB)
    Collecting pycparser
      Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
         |████████████████████████████████| 112 kB 3.4 kB/s
    Installing collected packages: pycparser, cffi, greenlet, gevent
    Successfully installed cffi-1.14.0 gevent-1.4.0 greenlet-0.4.15 pycparser-2.20
    
    C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Scripts>pip install pandas
    Collecting pandas
      Downloading pandas-1.0.3-cp37-cp37m-win_amd64.whl (8.7 MB)
         |██████████                      | 2.7 MB 12 kB/s eta 0:07:44ERROR: Exception:
    Traceback (most recent call last):
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 425, in _error_catcher
        yield
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 507, in read
        data = self._fp.read(amt) if not fp_closed else b""
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
        data = self.__fp.read(amt)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\http\client.py", line 447, in read
        n = self.readinto(b)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\http\client.py", line 491, in readinto
        n = self.fp.readinto(b)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\socket.py", line 589, in readinto
        return self._sock.recv_into(b)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\ssl.py", line 1052, in recv_into
        return self.read(nbytes, buffer)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\ssl.py", line 911, in read
        return self._sslobj.read(len, buffer)
    socket.timeout: The read operation timed out
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\cli\base_command.py", line 186, in _main
        status = self.run(options, args)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\commands\install.py", line 331, in run
        resolver.resolve(requirement_set)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\legacy_resolve.py", line 177, in resolve
        discovered_reqs.extend(self._resolve_one(requirement_set, req))
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\legacy_resolve.py", line 333, in _resolve_one
        abstract_dist = self._get_abstract_dist_for(req_to_install)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\legacy_resolve.py", line 282, in _get_abstract_dist_for
        abstract_dist = self.preparer.prepare_linked_requirement(req)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 482, in prepare_linked_requirement
        hashes=hashes,
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 287, in unpack_url
        hashes=hashes,
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 159, in unpack_http_url
        link, downloader, temp_dir.path, hashes
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 303, in _download_http_url
        for chunk in download.chunks:
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\utils\ui.py", line 160, in iter
        for x in it:
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\network\utils.py", line 39, in response_chunks
        decode_content=False,
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 564, in stream
        data = self.read(amt=amt, decode_content=decode_content)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 529, in read
        raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\contextlib.py", line 130, in __exit__
        self.gen.throw(type, value, traceback)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 430, in _error_catcher
        raise ReadTimeoutError(self._pool, None, "Read timed out.")
    pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
    
    C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Scripts>pip install pandas
    Collecting pandas
      Downloading pandas-1.0.3-cp37-cp37m-win_amd64.whl (8.7 MB)
         |██                              | 542 kB 6.9 kB/s eta 0:19:45ERROR: Exception:
    Traceback (most recent call last):
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 425, in _error_catcher
        yield
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 507, in read
        data = self._fp.read(amt) if not fp_closed else b""
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
        data = self.__fp.read(amt)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\http\client.py", line 447, in read
        n = self.readinto(b)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\http\client.py", line 491, in readinto
        n = self.fp.readinto(b)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\socket.py", line 589, in readinto
        return self._sock.recv_into(b)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\ssl.py", line 1052, in recv_into
        return self.read(nbytes, buffer)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\ssl.py", line 911, in read
        return self._sslobj.read(len, buffer)
    socket.timeout: The read operation timed out
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\cli\base_command.py", line 186, in _main
        status = self.run(options, args)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\commands\install.py", line 331, in run
        resolver.resolve(requirement_set)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\legacy_resolve.py", line 177, in resolve
        discovered_reqs.extend(self._resolve_one(requirement_set, req))
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\legacy_resolve.py", line 333, in _resolve_one
        abstract_dist = self._get_abstract_dist_for(req_to_install)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\legacy_resolve.py", line 282, in _get_abstract_dist_for
        abstract_dist = self.preparer.prepare_linked_requirement(req)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 482, in prepare_linked_requirement
        hashes=hashes,
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 287, in unpack_url
        hashes=hashes,
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 159, in unpack_http_url
        link, downloader, temp_dir.path, hashes
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 303, in _download_http_url
        for chunk in download.chunks:
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\utils\ui.py", line 160, in iter
        for x in it:
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\network\utils.py", line 39, in response_chunks
        decode_content=False,
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 564, in stream
        data = self.read(amt=amt, decode_content=decode_content)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 529, in read
        raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\contextlib.py", line 130, in __exit__
        self.gen.throw(type, value, traceback)
      File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 430, in _error_catcher
        raise ReadTimeoutError(self._pool, None, "Read timed out.")
    pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
    
    C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Scripts>pip3 install  -i  https://pypi.tuna.tsinghua.edu.cn/simple   pandas
    Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
    Collecting pandas
      Downloading https://pypi.tuna.tsinghua.edu.cn/packages/69/69/c35fbbc9bec374c44e9c800e491e914a521dc3926fc6cee80d4821771295/pandas-1.0.3-cp37-cp37m-win_amd64.whl (8.7 MB)
         |████████████████████████████████| 8.7 MB 6.4 MB/s
    Collecting python-dateutil>=2.6.1
      Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
         |████████████████████████████████| 227 kB ...
    Collecting numpy>=1.13.3
      Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f9/50/cd3e12bf41ac273702882610fd43bd765b8d2b99baf4295b00578fd69323/numpy-1.18.2-cp37-cp37m-win_amd64.whl (12.8 MB)
         |████████████████████████████████| 12.8 MB 6.4 MB/s
    Collecting pytz>=2017.2
      Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e7/f9/f0b53f88060247251bf481fa6ea62cd0d25bf1b11a87888e53ce5b7c8ad2/pytz-2019.3-py2.py3-none-any.whl (509 kB)
         |████████████████████████████████| 509 kB 6.4 MB/s
    Collecting six>=1.5
      Downloading https://pypi.tuna.tsinghua.edu.cn/packages/65/eb/1f97cb97bfc2390a276969c6fae16075da282f5058082d4cb10c6c5c1dba/six-1.14.0-py2.py3-none-any.whl (10 kB)
    Installing collected packages: six, python-dateutil, numpy, pytz, pandas
    Successfully installed numpy-1.18.2 pandas-1.0.3 python-dateutil-2.8.1 pytz-2019.3 six-1.14.0
    
    C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Scripts>pandas
    'pandas' 不是内部或外部命令,也不是可运行的程序
    或批处理文件。
    
    C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Scripts>pandas -version
    'pandas' 不是内部或外部命令,也不是可运行的程序
    或批处理文件。
    
    C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Scripts>python
    Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import pandas as df
    >>>
    
    展开全文
  • Windows pip 安装 pandas

    万次阅读 2017-12-05 09:05:56
    参考:https://www.cnblogs.com/lxmhhy/p/6029465.html pip 能正常使用就行了。 pip install ... pandas -i http: // pypi.douban.com/simple --trusted-host pypi.douban.com

    参考:https://www.cnblogs.com/lxmhhy/p/6029465.html

    pip 能正常使用就行了。

    pip install matplotlib -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
    pip install numpy -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
    pip install pandas -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
    
    

    展开全文
  • windows下如何安装Python、pandas本篇主要涵盖以下三部分内容:Python、Pycharm的安装使用Pycharm创建、运行Python程序安装pandas1.Python、Pycharm的安装Pycharm是一个ide,说简单点就是一个用来编写Python程序的...

    windows下如何安装Python、pandas

    本篇主要涵盖以下三部分内容:

    Python、Pycharm的安装

    使用Pycharm创建、运行Python程序

    安装pandas

    1.Python、Pycharm的安装

    Pycharm是一个ide,说简单点就是一个用来编写Python程序的软件,也是个神器,可以让我们更加方便的编写Python程序。我们后面安装pandas就需要用到它。Pycharm有收费版本也有免费版本,我们用免费版本就已经绰绰有余了。

    下载好之后一路点击next就能安装好。

    2.使用Pycharm创建、运行Python程序

    安装好Python和Pycharm之后,我们打开pycharm(桌面上应该有快捷方式),打开之后出现下图。

    1373668-20181022184710053-293056540.png

    点击创建create new project,出现下图:

    1373668-20181022184732947-368327210.png

    这里需要在红框中填写一个路径地址。这里解释一下这个路径,每当我们新建一个Python项目,一般是创建个新的空文件夹,把和这个项目相关的程序、数据等内容都放在这个文件夹中,方便管理。红色框中的路径就是指向这个文件夹。我这里这个文件夹叫demo,填写好之后点击create,出现下面这个画面:

    1373668-20181022184746785-309126961.png

    顺序点击File,New,Python File,填写文件名,这就创建了一个Python程序文件,如下图所示:

    1373668-20181022185005432-1858334119.png

    输入一行简单的代码 print 'Hello World!',顺序点击Run,Run 'demo',就可以运行程序,并且查看输出了,结果如下图:

    1373668-20181022185125881-581186377.png

    以上就是一个简单的Python程序。

    3.安装pandas

    pandas是Python下面的一个库,一般来说安装库都是非常麻烦的,因为需要在命令行下面操作的,利用pip, easy_install等工具,对于非计算机专业的人来说简直是噩梦。幸好有了Pycharm,它可以帮我们很方便的安装各类库。下面以安装pandas为例,介绍如何使用Pycharm安装package:

    顺序点击File,Settings,出现下面这个设置页面:

    1373668-20181022185231049-1694983359.png

    然后点击Project,Project Interpreter,如下图所示,点击页面最右边的+号:

    1373668-20181022185301313-561528105.png

    出现下面这个页面:

    1373668-20181022185315677-34795514.png

    在搜索框中输入pandas,点击最下方的Install Package,根据网速快慢,等待不定的时间,就完成了安装,如下图所示:

    1373668-20181022185343940-1053443988.png

    安装过程中可能会提示:Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). Get it from http://aka.ms/vcpython27

    只要按照提示说的的去下载一个VC就可以了。这样就安装好了pandas。

    然后在按照同样的流程安装好其他一些pandas依赖的package,分别是:numpy,dateutil,可能还有其他。

    安装好之后试着运行下面这个程序,如果没有报错,就说明完全安装好pandas了。如果报错,一般是因为缺少依赖的库,按照上述方法继续安装就可以了。

    1373668-20181022185403655-2034082593.png

    展开全文
  • Windows下安装Python EDP_free并安装pandas

    千次阅读 2017-06-04 21:59:55
    WindowS下安装Python EDP_free 以及pandas
  • 我之前安装过numpy的包,今天想安装pandas与matplotlib的时候就安装不上了,老是报错,我贴上我报错的图: 在网上看了些办法,比如将numpy卸载掉再重新安装numpy pandas等等,原因说的是可能以前的版本不适用了。 ...
  • Windows下用最新pip安装pandas

    千次阅读 2016-07-29 22:05:27
    1、首先安装最新的pip 2、pip install xxxx(包名) 安装需要的包 3、pip list –outdated 列出所有过期的包 ...成功安装pandas后,出现了这些问题。 from . import hashtable, tslib, lib ImportError: canno
  • windows 环境python安装pandas

    千次阅读 2018-07-13 10:39:00
    2019独角兽企业重金招聘Python工程师标准>>> ...然后用pip安装 pandas pip install pandas 转载于:https://my.oschina.net/jingshishengxu/blog/1845793
  • Windows下安装numpy和pandas

    千次阅读 2018-05-31 13:46:29
    因为用到了pandas来写一个分析结果,在网上了一堆安装包,但是都没安装成功。总报错C:\Python36\Scripts>pip install numpy-1.14.3-cp27-none-win_amd64.whlRequirement 'numpy-1.14.3-cp27-none-win_amd64...
  • windows下如何安装Python、pandas本篇主要涵盖以下三部分内容:Python、Pycharm的安装使用Pycharm创建、运行Python程序安装pandas1.Python、Pycharm的安装Pycharm是一个ide,说简单点就是一个用来编写Python程序的...
  • windows下如何安装Python、pandas 本篇主要涵盖以下三部分内容: Python、Pycharm的安装 使用Pycharm创建、运行Python程序 安装pandas 1.Python、Pycharm的安装 Pycharm是一个ide,说简单点就是一个用来编写...
  • 用cmd进入python的安装目录的sripts文件夹,输入pip install pandas 等它自己下载安装完成,提示 转载于:https://www.cnblogs.com/xuqiulin/p/6623154.html
  • python 安装pandas

    2021-03-25 19:36:57
    python 安装pandas库python3.7安装pandas库1、下载pandas文件2、打开cmd,开始安装 python3.7安装pandas库 本文介绍的是我个人实验过后觉得最快速安装python库的方法,比pip install pandas更快速。 同样的方法可以...
  • python在windows系统中安装pandas,numpy

    千次阅读 2018-03-06 11:03:51
    进入python的安装目录的sripts文件夹, 在该文件夹进入命令行,在命令行输入pip install pandas 等待成功安装 转载自:https://www.cnblogs.com/xuqiulin/p/6623154.html...
  • windows下如何安装Python、pandas 本篇主要涵盖以下三部分内容: Python、Pycharm的安装 使用Pycharm创建、运行Python程序 安装pandas 1.Python、Pycharm的安装 Pycharm是一个ide,说简单点就是一个用来编写...
  • 使用pip安装pandas安装失败 登录网址Python Extension Packages for Windows - Christoph Gohlke,ctrl+F查找pandas版本,下载后在cmd里安装
  • python 科学计算环境配置,pandas,numpy
  • 一、Pandas安装 Windows: pip install -i https://pypi.douban.com/simple pandas Linux: sudo pip install -i https://pypi.douban.com/simple pandas 二、SciPy、sklearn安装 由于包之间的...
  • 安装pandas

    2018-10-22 22:48:02
    Windows系统环境,下载最下面的。 然后解压:里面会有setup.py文件。 2、 cmd启动命令行。 cd 到解压的文件夹。 运行指令:python setup.py install 3、可能会出现一个error(如果不出现,则说明没有这个问题): ...
  • 量化-windows下如何安装Python、pandas

    千次阅读 2016-06-28 23:59:30
    本篇内容主要讲如何安装Python和pandas。Python比较好安装,而pandas比较难装,当时装了我一整天。pandas是Python下面的一个package,专门用于金融数据的分析,简直是神器。这里有pandas的简单入门介绍...
  • 使用vscode安装非常简单。 安装numpy pip install numpy 输入这行代码不会报错就安装成功了 import numpy as np ...安装pandas pip install pandas 输入这行代码不会报错就安装成功了 import pandas as pd ...
  • Python安装pandas模块

    万次阅读 热门讨论 2019-07-07 20:53:50
    在学习Python过程中,我们经常需要安装一些模块,那么今天小编就手把手教大家如何简单安装pandas这个模块 首先,Windows+R打开命令窗口,即 然后,查看自己Python中Scripts的安装路径(小编的路径为D:\soft2\python\...
  • 机器学习1:在windows下安装scipy,numpy,matplotlib,pandas,sklearn库 使用http://www.lfd.uci.edu/~gohlke/pythonlibs/ 这个地址来下载,虽然很多书上都是这种装法,但速度特别慢还特别复杂,打开cmd(已经配置好...
  • Pandas是一个强大的Python数据分析模块,这里我们先使用ANACONDA来帮助获取Pandas所以来的一些环境,然后来初步学习Windows下Python使用Pandas模块操作Excel文件的教程
  • windows10 import pandas 报错与解决

    千次阅读 2020-05-02 22:42:29
    windows10环境使用 pip install pandas 后会出现不能使用pandas,并报错的情况, 如下图 这个时候需要更换 pandas 的版本 首先卸载之前的 pandas pip uninstall pandas 然后指定 pip 下载pandas的 1.0.1...
  • python手动安装pandas

    万次阅读 2019-08-23 09:15:35
    1.直接在cmd里pip install pandas 2若1失败,在下载地址:...例如我的python是3.6.2 位数32 选择 pandas-0.25.1-cp36-cp36m-win32.whl 下载; 下载后把whl文件放在c盘的一个文件夹(要求能找到路径,...
  • 一、pandas 因为用pip 老提示timeout,设置代理也没用,设置timeout时间也不管事,后来单个安装包,总是少各种东西,装了一下午也没成功。 最后在要放弃的时候,找到了一个最简单的办法 那就是安装anaconda!!! ...
  • windows下 在Python中安装numpy和pandas

    千次阅读 2017-09-08 16:07:15
    1.安装numpy去网站 https://pypi.python.org/pypi/numpy 下载对应的版本的numpy就行。...然后放到Python安装目录的script文件。(在安装Python时,我的script文件夹就已经是环境变量那了)在使用命令pip3.6 i
  • Python数据科学安装Numby,pandas,scipy,matpotlib等(IPython安装pandas)如果还没有本地安装Python、IPython、notebook等请移步上篇 Python,IPython,qtconsole,Notebook,Jupyter快速安装教程 本教程是安装二进制...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 18,916
精华内容 7,566
关键字:

windows下安装pandas