摘要:
import requests from pandas import DataFrame url = "***" payload = '***' headers = { 'Content-Type': 'application/x-www-form-urlencoded' } response = 阅读全文
posted @ 2021-02-20 17:25
OTAKU_nicole
阅读(222)
评论(0)
推荐(0)
摘要:
import pandas as pd xls_file = pd.ExcelFile("examples/ex1.xlsx") table = xls_file.parse("Sheet1") print(table) ''' Unnamed: 0 a b c d message 0 0 1 2 阅读全文
posted @ 2021-02-20 17:07
OTAKU_nicole
阅读(265)
评论(0)
推荐(0)
摘要:
import pandas as pd frame = pd.read_csv("examples/ex1.csv") print(frame) ''' a b c d message 0 1 2 3 4 hello 1 5 6 7 8 world 2 9 10 11 12 foo ''' #fra 阅读全文
posted @ 2021-02-20 16:14
OTAKU_nicole
阅读(212)
评论(0)
推荐(0)
摘要:
AttributeError: 'DataFrame' object has no attribute 'save'frame.save改为frame.to_pickleAttributeError: module 'pandas' has no attribute 'load'pd.load改为p 阅读全文
posted @ 2021-02-20 16:12
OTAKU_nicole
阅读(1969)
评论(0)
推荐(0)
摘要:
from urllib.request import urlopen from lxml.html import parse parsed = parse(urlopen("https://www.cnblogs.com/nicole-zhang/")) doc = parsed.getroot() 阅读全文
posted @ 2021-02-20 15:58
OTAKU_nicole
阅读(193)
评论(0)
推荐(0)
摘要:
import json from pandas import DataFrame obj = """ {"orderBy":"default","orderWay":"desc","pageNo":1,"pageSize":15,"conditions":[{"name":"aaa","age":2 阅读全文
posted @ 2021-02-20 15:34
OTAKU_nicole
阅读(79)
评论(0)
推荐(0)
摘要:
import sys import pandas as pd data = pd.read_csv("examples/ex5.csv") print(data) ''' something a b c d message 0 one 1 2 3.0 4 NaN 1 two 5 6 NaN 8 wo 阅读全文
posted @ 2021-02-20 14:17
OTAKU_nicole
阅读(84)
评论(0)
推荐(0)
摘要:
cols 改为 columns 阅读全文
posted @ 2021-02-20 13:38
OTAKU_nicole
阅读(1101)
评论(0)
推荐(0)
摘要:
import pandas as pd from pandas import Series result = pd.read_csv("examples/ex6.csv") print(result) ''' one two three four key 0 0.467976 -0.038649 - 阅读全文
posted @ 2021-02-20 11:40
OTAKU_nicole
阅读(158)
评论(0)
推荐(0)
摘要:
order 改为 sort_values 阅读全文
posted @ 2021-02-20 11:20
OTAKU_nicole
阅读(240)
评论(0)
推荐(0)