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 :) |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello.
This thread is inspired by Issue #532.
The PandasAI's
SmartDataframeclass is inherited fromDataframeAbstract. In it's turn,DataframeAbstractrepresents an interface containing a method set matching the one from PandasDataFrameclass. So, as i undestand, it's important to keep consistency betweenSmartDataframeand Pandas'DataFrameclasses (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
SmartDataframefrompandas.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().All reactions