TypeError: __init__() got an unexpected keyword argument 'colums'
时间: 2023-09-30 08:08:59 浏览: 153
第十一天 04魔法方法【千锋Python人工智能学院】1
This error message indicates that there is a typo in the code where the argument 'colums' is being passed to the __init__() method of a class. The correct argument should be 'columns' instead of 'colums'.
For example, if you have a class named 'Dataframe' with an __init__() method that takes a 'columns' argument, the correct code would be:
```
class Dataframe:
def __init__(self, columns):
self.columns = columns
```
If you passed 'colums' instead of 'columns' when creating an instance of the Dataframe class, you would get the TypeError mentioned in the error message.
阅读全文