ENH: Distinguish widths argument in read_fwf
State: closed

- [x] closes #34953
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Labels:
name: IO Data
description: IO issues that don't fit into a more specific label
name: Error Reporting
description: Incorrect or improved errors from pandas

Comments:
To start the discussion about the argument names, thought I make the changes and create a PR. To make it consistent, I changed `colspecs` to `col_specs` as well. 
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 `col_specs` is much better than `colspecs` so I'd be -1 on doing this given churn
> This breaks API pretty heavily so can't just go with it in current form; would have to go through a depreciation cycle first

Sure, but I'm not familiar with it, is there any documentation on that which I can go through? 

> This is somewhat related to #22639 though I don't think `col_specs` is much better than `colspecs` so I'd be -1 on doing this given churn

In my opinion I think going with `col_specs` and `col_widths` would make more sense, purely for the consistency and the problem I mentioned in the issue, where using `width` instead of `widths` will not throw an error and the argument names are too similar.  Plus using underscore for multi word variables is agreed upon in the issue you are referencing to right?


> 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
> > 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?
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 <notifications@github.com> 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.

Hi @erfannariman - is this still active?
Yes, will pick this up after my vacation. 
@erfannariman Can you merge master to fix conflicts?