Skip to content
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

fix(smartdataframe) : Changed path parameter for exporting #614

Merged
merged 1 commit into from
Oct 4, 2023
Merged

fix(smartdataframe) : Changed path parameter for exporting #614

merged 1 commit into from
Oct 4, 2023

Conversation

Tanmaypatil123
Copy link
Contributor

@Tanmaypatil123 Tanmaypatil123 commented Oct 4, 2023

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.

As per official documentation of pandas , The parameter for exporting dataframe to csv is path_or_buf not path.

Summary by CodeRabbit

  • Enhancement: Modified the to_csv() method in the abstract_df.py file. The method now accepts both a file path and a buffer as the destination for writing CSV data, increasing flexibility and usability. This change does not affect existing functionality when providing a file path.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 4, 2023

Walkthrough

The change enhances the to_csv() method in the abstract_df.py file of the pandasai project. It now accepts both a file path and a buffer as the destination for writing CSV data, increasing flexibility and usability.

Changes

File Path Summary
.../smart_dataframe/abstract_df.py Modified to_csv() to accept path_or_buf, allowing both file path and buffer as output destinations

🐇🎉

"In the land of code, where logic is king,
A small change was made, a simple thing.
Now to_csv() sings a new song,
Accepting paths and buffers all day long.
So let's celebrate this change, so neat,
Making our dataframe suite more complete!" 🥕🎊


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • Mention @coderabbitai in any review comment for bot assistance.
  • Note: Review comments are made on code diffs or files, not on the PR overview.

Pause Incremental Reviews

  • Insert @coderabbitai: ignore in the PR description to halt the bot's ongoing reviews. Remove the line to resume.
  • Additionally, enter @coderabbitai pause to halt the bot's ongoing reviews as any issue or review comment. To
    resume reviews, enter @coderabbitai resume as any issue or review comment.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Commits Files that changed from the base of the PR and between 2098539 and d58f23d.
Files selected for processing (1)
  • pandasai/smart_dataframe/abstract_df.py (1 hunks)
Additional comments (Suppressed): 1
pandasai/smart_dataframe/abstract_df.py (1)
  • 282-282: The parameter name has been changed from path to path_or_buf. Ensure that all calls to this function throughout the codebase have been updated to match the new signature. Also, verify that the underlying dataframe's to_csv() method supports both file paths and buffers as input.

@codecov-commenter
Copy link

Codecov Report

Merging #614 (d58f23d) into main (2098539) will not change coverage.
The diff coverage is 0.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@           Coverage Diff           @@
##             main     #614   +/-   ##
=======================================
  Coverage   83.53%   83.53%           
=======================================
  Files          55       55           
  Lines        2696     2696           
=======================================
  Hits         2252     2252           
  Misses        444      444           
Files Coverage Δ
pandasai/smart_dataframe/abstract_df.py 54.31% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@gventuri gventuri merged commit a19cfe6 into Sinaptik-AI:main Oct 4, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants