记吧记吧
2023-11-30 20:05
views:
664
source:
是鱼骨
import csv
import pandas as pd
from io import StringIO
from urllib import request
url =
data = request.urlopen(url).read().decode(encoding='gb2312')
creader = csv.reader(StringIO(data))
dlists = [rw for rw in creader]
allData = pd.DataFrame(dlists[1:], columns=dlists[0])
print(allData)
Disclaimer: The above articles are added by users themselves and are only for typing and communication purposes. They do not represent the views of this website, and this website does not assume any legal responsibility. This statement is hereby made! If there is any infringement of your rights, please contact us promptly to delete it.