Relationship of the SmartDataframe
and Pandas' DataFrame
#544
Closed
nautics889
started this conversation in
Ideas
Replies: 1 comment
-
Well, after writing this topic, i understood the obvious: Like this: class SmartDataframe(DataframeAbstract, Shortcuts):
...
def to_dict(...):
return self._df.to_dict(...)
... @gventuri correct me if i'm wrong pls :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello.
This thread is inspired by Issue #532.
The PandasAI's
SmartDataframe
class is inherited fromDataframeAbstract
. In it's turn,DataframeAbstract
represents an interface containing a method set matching the one from PandasDataFrame
class. So, as i undestand, it's important to keep consistency betweenSmartDataframe
and Pandas'DataFrame
classes (their behaviour, signatures and side effects).Therefore, when i started adding
.to_dict()
method (#532 ) it seemed kind of confusing for me: to put all implementation details "as is" from pandas library inSmartDataframe
.Shouldn't we consider inheriting
SmartDataframe
frompandas.core.frame.DataFrame
?Or the methods supposed to have their own, independent implementation within PandasAI library?
List of method from
DataframeAbstract
:All of the above are present in
pandas.core.frame.DataFrame
(pandas v1.5.3) except.concat()
.Beta Was this translation helpful? Give feedback.
All reactions