[英]failed to correct : this error SyntaxError: positional argument follows keyword argument
most_rated = pd.DataFrame(["135085","132825","135032","135052","132834"], index=np.arange(5), columns['placeID'])
This code is not working, instead showing this error.此代码不起作用,而是显示此错误。
Try this.尝试这个。
most_rated = pd.DataFrame({"135085","132825","135032","135052","132834"}, index=np.arange(5), columns=["placeID"])
So the problem is that you've got a keyword
argument, that is, one that starts with arg_name=
before a positional
argument - that is, one that doesn't start with a arg_name=
.所以问题是你有一个
keyword
参数,即在positional
参数之前以arg_name=
开头的参数 - 即不以arg_name=
开头的参数。 In this case, it's that you have index=np.arange(5)
before the final argument, columns['placeID']
.在这种情况下,您在最后一个参数
columns['placeID']
之前有index=np.arange(5)
。 You need to specify whichever positional
arguments you want before ANY keyword
arguments.您需要在任何
keyword
arguments 之前指定您想要的任何positional
arguments。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.