BrandonFors/pandas-github-issues huggingface dataset:
Checks for left_index and right_index merge parameters
State: closed

Hi,

I just committed an error when I was doing an analysis using pandas and this motivated me to implement two checks which in my opinion are necessary. 

I was trying to perform a merge and I confused the parameters "left_on" and "right_on" for "left_index" and "right_index". I ran the code and it did not raised me any error. It produced a table which seem to be fine in terms of shape. I suspect that what happened is that the tables got merged by the index of the data frame. I think it would be a great idea to check if right_index and left_index are of type bool, if not, raise an error. This way we will avoid that more people got the same error as mine :D.

Tests passed 

Thanks!


Labels:
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: Error Reporting
description: Incorrect or improved errors from pandas

Comments:
## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/14434?src=pr) is 85.25% (diff: 100%)

> Merging [#14434](https://codecov.io/gh/pandas-dev/pandas/pull/14434?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will increase coverage by **<.01%**

``` diff
@@             master     #14434   diff @@
==========================================
  Files           140        140          
  Lines         50631      50635     +4   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43166      43171     +5   
+ Misses         7465       7464     -1   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [c31ea34...e18b7c9](https://codecov.io/gh/pandas-dev/pandas/compare/c31ea341747ac40d83e64d00bac179548e4b716e...e18b7c92cd62139cb6984d5af638b9a0554ddb26?src=pr)

Updated!

Is there still any change to do? Thanks!

pls add a whatsnew entry in 0.19.1. ping on green.

Done!

@jreback green

@ivallesp No matter, @jreback already merged and addressed those comments!

@jorisvandenbossche was your 2nd one the comment reference in the tests? (decided not a big deal)

yep, but indeed not a big deal
BUG: underflow on Timestamp creation
State: closed

- [x] closes #14415
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Bug
name: Datetime
description: Datetime data dtype

Comments:
## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/14433?src=pr) is 85.26% (diff: 100%)

> Merging [#14433](https://codecov.io/gh/pandas-dev/pandas/pull/14433?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will increase coverage by **<.01%**

``` diff
@@             master     #14433   diff @@
==========================================
  Files           140        140          
  Lines         50640      50640          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43175      43176     +1   
+ Misses         7465       7464     -1   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [921ce47...4b7674c](https://codecov.io/gh/pandas-dev/pandas/compare/921ce47c1a3da6b24965890c622aed61423d3bf7...4b7674ca11fc027fbca4f7878bddb1c64f6f2733?src=pr)

lgtm. Push again though (you might need to `git commmit --all --amend -C amend` to generate a new has. Want to make sure that appveyor is working. I just turned it back on (was set to old pydata/pandas repo)

lgtm. rebase and merge.
BUG: Fix issue with inserting duplicate columns in a dataframe (#14291)
State: closed

- [x] closes #14291
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry

Resubmitting PR (@jorisvandenbossche)


Labels:
name: Bug
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode

Comments:
## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/14431?src=pr) is 85.25% (diff: 100%)

> Merging [#14431](https://codecov.io/gh/pandas-dev/pandas/pull/14431?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will not change coverage

``` diff
@@             master     #14431   diff @@
==========================================
  Files           140        140          
  Lines         50655      50655          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          43185      43185          
  Misses         7470       7470          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [233d51d...2698005](https://codecov.io/gh/pandas-dev/pandas/compare/233d51dd099f590379bd9144c40a61f6785b2b57...2698005dae0b37fa8a205371f799cf9e5069175d?src=pr)

This looks good to me (restarted the failing mac build on travis, should be unrelated)

@paul-mannino Can you rebase (there is a merge conflict, probably in the whatsnew file)

thanks!
DOC: correct DataFrame.pivot docstring
State: closed

The mention of panels that are created is not correct. You get a multi-index, I noticed


Labels:
name: Docs

Comments:
## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/14430?src=pr) is 85.25% (diff: 100%)

> Merging [#14430](https://codecov.io/gh/pandas-dev/pandas/pull/14430?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will decrease coverage by **<.01%**

``` diff
@@             master     #14430   diff @@
==========================================
  Files           140        140          
  Lines         50631      50631          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits          43167      43166     -1   
- Misses         7464       7465     +1   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [7cad3f1...3258159](https://codecov.io/gh/pandas-dev/pandas/compare/7cad3f16bccd1d4702ef9d038b1ee0db33b9bb94...325815904228575261ac6a77939d888e6391b87d?src=pr)

lgtm.
PERF: improved perf in .to_json when lines=True
State: closed

closes #14408

master

```
In [1]: np.random.seed(1234)

In [2]: N = 100000
   ...: C = 5
   ...: df = DataFrame(dict([('float{0}'.format(i), np.random.randn(N)) for i in range(C)]))

In [3]: %timeit df.to_json('foo.json',orient='records',lines=True)
1 loop, best of 3: 3.67 s per loop
```

PR (with proper encoding/decoding, IOW work directly on the bytes and minimize copies)

```
In [5]: %timeit df.to_json('foo.json',orient='records',lines=True)
10 loops, best of 3: 137 ms per loop
```


Labels:
name: Performance
description: Memory or execution speed performance
name: IO JSON
description: read_json, to_json, json_normalize

Comments:
xref #14391 

cc @joshowen 

## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/14429?src=pr) is 85.26% (diff: 100%)

> Merging [#14429](https://codecov.io/gh/pandas-dev/pandas/pull/14429?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will decrease coverage by **<.01%**

``` diff
@@             master     #14429   diff @@
==========================================
  Files           140        140          
  Lines         50639      50622    -17   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits          43177      43161    -16   
+ Misses         7462       7461     -1   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [286b9b9...e855e1f](https://codecov.io/gh/pandas-dev/pandas/compare/286b9b94d97fb2256d228a8970e92eee2ac3078a...e855e1ff9c5c505f9b50ff3e6f01b1da5f519522?src=pr)

Looks good to me

closed by https://github.com/pandas-dev/pandas/commit/7cad3f16bccd1d4702ef9d038b1ee0db33b9bb94
Bug: Grouping by index and column fails on DataFrame with single index (GH14327)
State: closed

- [x] closes #14327
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry

This PR is a continuation of #14333. See discussion there for explanation of why this new PR was needed.


Labels:
name: Bug
name: Groupby

Comments:
## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/14428?src=pr) is 85.26% (diff: 96.29%)

> Merging [#14428](https://codecov.io/gh/pandas-dev/pandas/pull/14428?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will increase coverage by **<.01%**

``` diff
@@             master     #14428   diff @@
==========================================
  Files           140        140          
  Lines         50639      50649    +10   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43177      43186     +9   
- Misses         7462       7463     +1   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [286b9b9...9694755](https://codecov.io/gh/pandas-dev/pandas/compare/286b9b94d97fb2256d228a8970e92eee2ac3078a...9694755e1dea4be8dbcbb3484abd22fdbb90c4a7?src=pr)

@jreback it's green

@jmmease can you make the doc-string updates.

@jreback Made documentation updates and then rebased to resolve conflict in whatsnew 0.19.1.
Let me know if there's anything else!

lgtm

ping on green

@jreback green 

@jmmease Thanks!
ENH: merge_asof() has left_index/right_index and left_by/right_by (#14253)
State: closed

- [x] closes #14253 
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Enhancement
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode

Comments:
I'll be the first to admit that there is some kludge in here, identified by comments in the source code. There are some code paths that can only be hit during a `pd.merge_asof()` when `left_index` or `right_index` is set, so no existing functionality will be affected.

I think for pandas 2.0 we'll need to take a [more holistic view of how to do merges](https://github.com/pandas-dev/pandas2/issues/31).

## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/14426?src=pr) is 85.26% (diff: 87.23%)

> Merging [#14426](https://codecov.io/gh/pandas-dev/pandas/pull/14426?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will decrease coverage by **<.01%**

``` diff
@@             master     #14426   diff @@
==========================================
  Files           140        140          
  Lines         50634      50660    +26   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43173      43193    +20   
- Misses         7461       7467     +6   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [7d40f18...f6f87b6](https://codecov.io/gh/pandas-dev/pandas/compare/7d40f18718ba80e8b8d706eaed2fc4c098686e71...f6f87b65f8b1dc80defa88aa6f02e3b71b6c32bb?src=pr)

I've had to resubmit this PR as #14531 because I had to recreate my pandas fork. Long story.
BUG: String indexing against object dtype may raise AttributeError
State: closed

- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry

String indexing may raise `AttributeError`, rather than `KeyError`.

```
df = pd.DataFrame([1], pd.Index([pd.Timestamp('2011-01-01')], dtype=object))
df.index.is_all_dates
# True
df['2011']
# AttributeError: 'Index' object has no attribute '_get_string_slice'
```


Labels:
name: Bug
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves

Comments:
## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/14424?src=pr) is 85.25% (diff: 100%)

> Merging [#14424](https://codecov.io/gh/pandas-dev/pandas/pull/14424?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will increase coverage by **<.01%**

``` diff
@@             master     #14424   diff @@
==========================================
  Files           140        140          
  Lines         50631      50632     +1   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43167      43168     +1   
  Misses         7464       7464          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [7cad3f1...ae22dce](https://codecov.io/gh/pandas-dev/pandas/compare/7cad3f16bccd1d4702ef9d038b1ee0db33b9bb94...ae22dce62e6d97d79d8786c6a16be7ca230799de?src=pr)

Small comment, looks good for the rest

@sinhrks Thanks!
Period factorization
State: closed

- [x] closes #14338
- [x] tests not needed / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry

asv 

```
   before     after       ratio
  [c41c6511] [96b364a4]
-     2.44s    46.28ms      0.02  groupby.groupby_period.time_groupby_sum
```

Continuation of #14348


Labels:
name: Performance
description: Memory or execution speed performance
name: Period
description: Period data type

Comments:
## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/14419?src=pr) is 85.26% (diff: 100%)

> Merging [#14419](https://codecov.io/gh/pandas-dev/pandas/pull/14419?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will not change coverage

``` diff
@@             master     #14419   diff @@
==========================================
  Files           140        140          
  Lines         50634      50634          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          43173      43173          
  Misses         7461       7461          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [7d40f18...a77ccc2](https://codecov.io/gh/pandas-dev/pandas/compare/7d40f18718ba80e8b8d706eaed2fc4c098686e71...a77ccc21df5316a630d138d4a5afe62e3e1491f6?src=pr)

@chris-b1 Thanks!
Concat with axis rows
State: closed

- [x] closes #14369 
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry

I closed #14389 and opened with one in hopes of the new commits showing up.


Labels:
name: Bug
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode

Comments:
Edit: Didn't realize you already knew this/it was just weirdness with the repo

Thanks for the tip @paul-mannino !  I'll do that next time.

## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/14416?src=pr) is 85.26% (diff: 100%)

> Merging [#14416](https://codecov.io/gh/pandas-dev/pandas/pull/14416?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will increase coverage by **<.01%**

``` diff
@@             master     #14416   diff @@
==========================================
  Files           140        140          
  Lines         50634      50642     +8   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43173      43181     +8   
  Misses         7461       7461          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [7d40f18...9aa260d](https://codecov.io/gh/pandas-dev/pandas/compare/7d40f18718ba80e8b8d706eaed2fc4c098686e71...9aa260d5ca21eb3acbd790fbb8812bfa94e60c8d?src=pr)

Actually, just using the `DataFrame` `_get_axis_number` causes tests with `Panel`s to fail.  I've updated it to use the `DataFrame` method if a `Series` is passed and to use the object itself (`sample`) otherwise.

Looks good to me

thanks!
Bug: Made it so that 0 was included in uint8
State: closed

- [ ] closes #14401 
- [ ] tests added / passed
- [ ] passes `git diff upstream/master | flake8 --diff`
- [ ] whatsnew entry

Decided to restart. Sorry for the inconvenience. -> #14472


Labels:
name: Bug
name: Dtype Conversions
description: Unexpected or buggy dtype conversions

Comments:
Thx for the PR. pls rebase existing PR from next.

## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/14412?src=pr) is 85.26% (diff: 100%)

> Merging [#14412](https://codecov.io/gh/pandas-dev/pandas/pull/14412?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will increase coverage by **<.01%**

``` diff
@@             master     #14412   diff @@
==========================================
  Files           140        140          
  Lines         50631      50634     +3   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43167      43173     +6   
+ Misses         7464       7461     -3   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [7cad3f1...2b2622c](https://codecov.io/gh/pandas-dev/pandas/compare/7cad3f16bccd1d4702ef9d038b1ee0db33b9bb94...2b2622c25b80e41ea1cdcb44d439f930c81c7abc?src=pr)

Added a series of tests which applied a pandas series that included the minimum and maximum values of each dtype to a to_numeric downcast to see if it would downcast to the appropriate dtype. It did not add to uint64 but I'm not sure if there were plans to include uint64 so I'll open up a new issue. Also edited the whatsnew.
DOC: pydata/pandas -> pandas-dev/pandas
State: closed

as main repo was updated


Labels:
name: Docs

Comments:
@jorisvandenbossche 
@wesm 

should fix any doc-building issues.......(of course github is re-directing, but might as well fix)

## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/14409?src=pr) is 85.26% (diff: 100%)

> No coverage report found for **master** at 4d7c6e7.
> 
> Powered by [Codecov](https://codecov.io?src=pr). Last update [4d7c6e7...f7ea30a](https://codecov.io/gh/pandas-dev/pandas/compare/4d7c6e7d980cacde91f86c79d608cbfbb37de606...f7ea30abe4f1eefd7404111fbb59c6e75f57e5cb?src=pr)

Indeed, thanks!
Convert readthedocs links for their .org -> .io migration for hosted projects
State: closed

As per [their blog post of the 27th April](https://blog.readthedocs.com/securing-subdomains/) ‘Securing subdomains’:

> Starting today, Read the Docs will start hosting projects from subdomains on the domain readthedocs.io, instead of on readthedocs.org. This change addresses some security concerns around site cookies while hosting user generated data on the same domain as our dashboard.

Test Plan: Manually visited all the links I’ve modified.


Labels:
name: Docs

Comments:
Thanks, looks good! 
Let us know if you have tested those links work

I clicked every one :)

Thanks!
Bug: Made it so that 0 was included in uint8
State: closed

- [ ] closes #14401 
- [ ] tests added / passed
- [ ] passes git diff upstream/master | flake8 --diff
- [ ] whatsnew entry


Labels:
name: Bug
name: Dtype Conversions
description: Unexpected or buggy dtype conversions

Comments:
pls add a test and a release note (0.19.1)

That should do it although it's not showing the commits.

u can try force pushing 

## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/14404?src=pr) is 85.26% (diff: 100%)

> Merging [#14404](https://codecov.io/gh/pandas-dev/pandas/pull/14404?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will not change coverage

``` diff
@@             master     #14404   diff @@
==========================================
  Files           140        140          
  Lines         50634      50634          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          43173      43173          
  Misses         7461       7461          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [e9d17cd...7031c97](https://codecov.io/gh/pandas-dev/pandas/compare/e9d17cda784c46818652b6ec9a8e35a5d0faefee...7031c97c48d0c108f4980dbbff8dd50d34bf0db3?src=pr)
BUG: Dataframe constructor when given dict with None value
State: closed

- [x] closes #14381
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Bug
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

Comments:
## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/14392?src=pr) is 85.26% (diff: 100%)

> No coverage report found for **master** at 096d886.
> 
> Powered by [Codecov](https://codecov.io?src=pr). Last update [096d886...231c2e4](https://codecov.io/gh/pandas-dev/pandas/compare/096d8866a90c8cbb44ab8243320e811fc24190bd...231c2e486182a8c65e14a4ee86eb7bdf39720c75?src=pr)

@brandonmburroughs Do you have time to update this PR according to the discussion in #14381 (so keep as None)

@jorisvandenbossche Yes, I'll update based upon the discussion and push the changes in the next day or so.

@brandonmburroughs Thanks a lot!