zoukankan      html  css  js  c++  java
  • Pandas学习

    1. 下载安装PyCharm(pycharm-community-2021.1.1.exe)

    2. 创建一个默认项目,并修改main.py

    https://github.com/hivsuper/pythonStudy.git

    import numpy as np
    import pandas as pd
    
    def print_hi():
        # Use a breakpoint in the code line below to debug your script.
        print(pd.Series([1, 3, 5, np.nan, 6, 8]))  # Press Ctrl+F8 to toggle the breakpoint.
    
    
    # Press the green button in the gutter to run the script.
    if __name__ == '__main__':
        print_hi()
    

    3. 在终端运行pip install pipenv添加Pipenv支持

    4. 通过添加环境变量WORKON_HOME来修改Pipenv的默认路径(需重启操作系统使变量生效)

    5. 在PyCharm中添加Python Interpreter

    File --> Settings… -> Project: pythonStudy -> Python Interpreter -> Add…

    6. 无法编译成功

    7. 在PyCharm重新安装numpy和 pandas后成功编译

    https://blog.csdn.net/defonds/article/details/108055633
    File --> Settings… -> Project: pythonStudy -> Python Interpreter

    8. 运行结果

    D:PipenvpythonStudy-xxxxxxScriptspython.exe D:/PycharmProjects/pythonProject/main.py
    0    1.0
    1    3.0
    2    5.0
    3    NaN
    4    6.0
    5    8.0
    dtype: float64
    
  • 相关阅读:
    Python学习之路2☞数据类型与变量
    Python学习之路1☞简介及入门代码
    OpenStack组件系列☞horizon搭建
    39
    38
    37
    36
    35
    33
    32
  • 原文地址:https://www.cnblogs.com/hiver/p/14828853.html
Copyright © 2011-2022 走看看