python 学习笔记(五)

python学习笔记(五)

  1. File
    a. 打开文件方式(读写两种方式)
    1)File = open (’/resources/data/example1.txt’, ‘w’)

    1. with open (’ example1.txt’ , ‘r’) as file:
      b. 文件对象的操作方法
      在这里插入图片描述
      c. 学习对excel 及 csv文件进行操作
      import pandas as pd

      excel:
      xlsx_path=‘file1_xlsx’
      df=pd. read_excel (xlsx_path)
      df. head()

      csv:
      csv_path=‘file1.csv’
      df=pd. read_csv (csv_path)
      df. head()

  2. OS模块
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

参考:http://www.runoob.com/python/os-file-methods.html

  1. datatime模块
    python中的datetime模块提供了操作日期和时间功能, 该模块提供了五种核心对象:datetime(时间日期类型), date(日期类型), time(时间类型), tzinfo(时区类型), timedelta(时间差类型)。

参考:https://www.jianshu.com/p/1957c4cab0a3

  1. 类和对象

参考:http://www.runoob.com/python/python-object.html

  1. 正则表达式

参考:http://www.runoob.com/python/python-reg-expressions.html

  1. re模块

参考:http://wiki.jikexueyuan.com/project/explore-python/Regular-Expressions/re.html

  1. http请求

参考:http://docs.python-requests.org/zh_CN/latest/user/quickstart.html

脑子转不过来了感觉,先把参考资料放上来再总结。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值