-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
@@ -24,5 +24,6 @@ def to_excel(df: pd.DataFrame, file_path: str, engine='', **kwargs) -> None: | |||
with open(tmp_file, 'rb') as source, s3.open(file_path, 'wb') as dest: | |||
dest.write(source.read()) | |||
os.remove(tmp_file) | |||
return |
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.
This isn't required here. it was before when the next line was an outdented df.to_excel(writer, **kwargs)
, which leads me to ask,
What should this function do in the case that is_s3_path(file_path) != True
?
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.
It should just run plain vanilla pandas.to_excel
.
The reason this was added was because both versions were running and causing downstream code to fail in the process since vanilla pandas has no concept of an s3 key
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.
oh, oops, I see that happens below. The GitHub view is difficult for me to read sometimes. 👍
``` | ||
## Excel | ||
|
||
By default, pandas will natively read to s3 but won't write to s3. |
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.
read from
|
||
By default, pandas will natively read to s3 but won't write to s3. |
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.
read from
This change is