DataFrame
我正在尝试为我正在处理的一些自定义数据编写一个继承 pandas 类的类。
class EquityDataFrame(DataFrame):
def __init__(self, *args, **kwargs):
DataFrame.__init__(self, *args, **kwargs)
def myfunc1(self,...)
... # does something
def myfunc2(self, ...)
... # does something
Run Code Online (Sandbox Code Playgroud)
在 PyCharm 中,我收到以下有关类名称的警告EquityDataFrame
:
Class EquityDataFrame must implement all abstract methods
This inspection detects when there aren't all abstract properties/methods defined in the subclass
Run Code Online (Sandbox Code Playgroud)
我尝试用谷歌搜索,但找不到此警告的有用描述。有人可以帮我看看这个警告是什么意思吗?
尝试像下面这样的东西
import pandas as pd
class MyDataframe(pd.DataFrame):
def __init__(self, *args, **kwargs):
super(MyDataframe, self).__init__(*args, **kwargs)
@property
def function_1(self, x):
@property
def function_2(self):
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2312 次 |
最近记录: |