摘要:
import requests from pandas import DataFrame url = "***" payload = '***' headers = { 'Content-Type': 'application/x-www-form-urlencoded' } response = 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
AttributeError: 'DataFrame' object has no attribute 'save'frame.save改为frame.to_pickleAttributeError: module 'pandas' has no attribute 'load'pd.load改为p 阅读全文
摘要:
from urllib.request import urlopen from lxml.html import parse parsed = parse(urlopen("https://www.cnblogs.com/nicole-zhang/")) doc = parsed.getroot() 阅读全文
摘要:
import json from pandas import DataFrame obj = """ {"orderBy":"default","orderWay":"desc","pageNo":1,"pageSize":15,"conditions":[{"name":"aaa","age":2 阅读全文
摘要:
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 阅读全文
摘要:
cols 改为 columns 阅读全文
摘要:
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 - 阅读全文
摘要:
order 改为 sort_values 阅读全文