-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: Distinguish widths argument in read_fwf #35057
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
ENH: Distinguish widths argument in read_fwf #35057
Conversation
To start the discussion about the argument names, thought I make the changes and create a PR. To make it consistent, I changed |
This breaks API pretty heavily so can't just go with it in current form; would have to go through a depreciation cycle first This is somewhat related to #22639 though I don't think |
Sure, but I'm not familiar with it, is there any documentation on that which I can go through?
In my opinion I think going with |
That is unrelated to the naming convention. I think if you wanted to remove kwargs from this and replace with the appropriate name arguments that would make more sense, as there are probably only a few that should be passed from this to the TextFileReader |
That makes sense as well. Although I would not be sure how to decide which name arguments to include / exclude, would that be all the arguments which can be found in the tests? |
The best way I think is to look at the TextFileReader implementation and see what kwargs it reads that make sense for a fixed width file
…Sent from my iPhone
On Jun 30, 2020, at 12:26 PM, Erfan Nariman ***@***.***> wrote:
where using width instead of widths will not throw an error and the argument names are too similar.
That is unrelated to the naming convention. I think if you wanted to remove kwargs from this and replace with the appropriate name arguments that would make more sense, as there are probably only a few that should be passed from this to the TextFileReader
That makes sense as well. Although I would not be sure how to decide which name arguments to include / exclude, would that be all the arguments which can be found in the tests?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
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.
yeah we cannot simply change these w/o a deprecation cycle, nor do i think the churn is worthile.
However as @WillAyd indicated, remove the ability to accept **kwargs
would be ok
Hi @erfannariman - is this still active? |
Yes, will pick this up after my vacation. |
…ce (#35899) * REF: remove unnecesary try/except * TST: add test for agg on ordered categorical cols (#35630) * TST: resample does not yield empty groups (#10603) (#35799) * revert accidental rebase * REF: handle axis=None cases inside DataFrame.all/any * annotate * dummy commit to force Travis Co-authored-by: Karthik Mathur <[email protected]> Co-authored-by: tkmz-n <[email protected]>
* REF: remove unnecesary try/except * TST: add test for agg on ordered categorical cols (#35630) * TST: resample does not yield empty groups (#10603) (#35799) * revert accidental rebase * BUG: BlockSlider not clearing index._cache * update whatsnew Co-authored-by: Karthik Mathur <[email protected]> Co-authored-by: tkmz-n <[email protected]>
…36045) * REF: remove unnecesary try/except * TST: add test for agg on ordered categorical cols (#35630) * TST: resample does not yield empty groups (#10603) (#35799) * revert accidental rebase * BUG: NDFrame.replace wrong exception type, wrong return when size==0 * bool->bool_t * whatsnew Co-authored-by: Karthik Mathur <[email protected]> Co-authored-by: tkmz-n <[email protected]>
…35852) * remove \n from docstring * fix issue 17038 * revert change * revert change * add dropna doc for factorize * rephrase the doc * flake8 * fixup * use NaN * add dropna in series.factorize * black * add test * linting * linting * doct * fix black * fixup * fix doctest * add whatsnew * linting * fix test * try one time * hide dropna and use na_sentinel=None * update whatsnew * rename test function * remove dropna from factorize * update doc * docstring * update doc * add comment * code change on review * update doc * code change on review * minor move in whatsnew * add default example * doc * one more try * explicit doc * add space
pandas\plotting\_matplotlib\core.py:231: error: "MPLPlot" has no attribute "style" [attr-defined] pandas\plotting\_matplotlib\core.py:232: error: "MPLPlot" has no attribute "style" [attr-defined] pandas\plotting\_matplotlib\core.py:233: error: "MPLPlot" has no attribute "style" [attr-defined] pandas\plotting\_matplotlib\core.py:235: error: "MPLPlot" has no attribute "style" [attr-defined] pandas\plotting\_matplotlib\core.py:385: error: "MPLPlot" has no attribute "label"; maybe "ylabel" or "xlabel"? [attr-defined] pandas\plotting\_matplotlib\core.py:553: error: "MPLPlot" has no attribute "mark_right" [attr-defined] pandas\plotting\_matplotlib\core.py:732: error: "MPLPlot" has no attribute "style" [attr-defined] pandas\plotting\_matplotlib\core.py:733: error: "MPLPlot" has no attribute "style" [attr-defined] pandas\plotting\_matplotlib\core.py:735: error: "MPLPlot" has no attribute "style" [attr-defined] pandas\plotting\_matplotlib\core.py:738: error: "MPLPlot" has no attribute "style" [attr-defined] pandas\plotting\_matplotlib\core.py:739: error: "MPLPlot" has no attribute "style" [attr-defined] pandas\plotting\_matplotlib\core.py:741: error: "MPLPlot" has no attribute "style" [attr-defined] pandas\plotting\_matplotlib\core.py:1008: error: "ScatterPlot" has no attribute "label" [attr-defined] pandas\plotting\_matplotlib\core.py:1075: error: "LinePlot" has no attribute "stacked" [attr-defined] pandas\plotting\_matplotlib\core.py:1180: error: "LinePlot" has no attribute "stacked" [attr-defined] pandas\plotting\_matplotlib\core.py:1269: error: "AreaPlot" has no attribute "stacked" [attr-defined] pandas\plotting\_matplotlib\core.py:1351: error: "BarPlot" has no attribute "stacked" [attr-defined] pandas\plotting\_matplotlib\core.py:1427: error: "BarPlot" has no attribute "stacked" [attr-defined]
* removed trailing comma * removed trailing commas * doc/make.py * doc/make.py * Update make.py
@erfannariman Can you merge master to fix conflicts? |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff