-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/24 pandas plugin #137
base: develop
Are you sure you want to change the base?
Feature/24 pandas plugin #137
Conversation
@rhenanbartels, thanks for your PR! I'm going to review it now, but you need to rebase since there are some conflicts between your branch and the current |
rows/__init__.py
Outdated
@@ -29,6 +29,7 @@ | |||
from rows.plugins._json import import_from_json, export_to_json | |||
from rows.plugins.csv import import_from_csv, export_to_csv | |||
from rows.plugins.txt import export_to_txt | |||
from rows.plugins._pandas import import_from_pandas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As pandas
is an optional dependency to rows
, you need to put this import inside a try
/except
clause. Need also to import export_to_pandas
.
@rhenanbartels, I just finished the code review. Please address the changes. ;-) Since this is the first plugin that does not use serialization/deserialization from/to a file (it just changes objects in memory), I don't know if the API should be the same. Thinking in maybe put it inside |
af1510c
to
8a2365f
Compare
Yes, I was thinking about that, maybe a |
yield list(data_frame) | ||
|
||
for _, row in data_frame.iterrows(): | ||
yield dataframe_row_to_list(row) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May use dataframe.itertuples
.
yield list(data_frame) | ||
|
||
for _, row in data_frame.iterrows(): | ||
yield dataframe_row_to_list(row) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May use dataframe.itertuples
.
fa144f0
to
bbb2c57
Compare
Hi Álvaro, I've just finish the code to import/export from/to pandas DataFrame. Can you please review it?
Thanks in advance!