What is wrong with this code?
import pandas as pd
url1 = 'https://raw.githubusercontent.com/ben519/DataWrangling/master/Data/users.csv'
url2 = 'https://raw.githubusercontent.com/ben519/DataWrangling/master/Data/sessions.csv'
url3 = 'https://raw.githubusercontent.com/ben519/DataWrangling/master/Data/products.csv'
url4 = 'https://raw.githubusercontent.com/ben519/DataWrangling/master/Data/transactions.csv'
lst = [url1, url2, url3, url4]
def read_func(url):
df = pd.read_csv(url)
return df
for i in lst:
users, sessions, products, transcation = read_func(i)
When I run it I get this error:
Traceback (most recent call last):
File "/main.py", line 15, in <module>
users, sessions, products, transcation = read_func(i)
ValueError: too many values to unpack (expected 4)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…