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

TST: mixed_int_string Index #54072

Open
jbrockmendel opened this issue Jul 10, 2023 · 19 comments
Open

TST: mixed_int_string Index #54072

jbrockmendel opened this issue Jul 10, 2023 · 19 comments
Assignees
Labels
good first issue Index Related to the Index class or subclasses Testing pandas testing functions or related to the test suite

Comments

@jbrockmendel
Copy link
Member

jbrockmendel commented Jul 10, 2023

Adding in conftest's indices_dict an entry:

"mixed-int-string": Index([0, "a", 1, "b", 2, "c"])

broke a bunch of tests the last time I checked. We should add an entry like this and fix the tests it breaks and/or bugs it surfaces.

@jbrockmendel jbrockmendel added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jul 10, 2023
@lithomas1 lithomas1 added Testing pandas testing functions or related to the test suite Index Related to the Index class or subclasses good first issue and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jul 11, 2023
@lithomas1
Copy link
Member

I'll tag this as a good first issue as adding the tests doesn't seem too hard.

pandas/pandas/conftest.py

Lines 595 to 628 in b4929f8

indices_dict = {
"string": tm.makeStringIndex(100),
"datetime": tm.makeDateIndex(100),
"datetime-tz": tm.makeDateIndex(100, tz="US/Pacific"),
"period": tm.makePeriodIndex(100),
"timedelta": tm.makeTimedeltaIndex(100),
"range": tm.makeRangeIndex(100),
"int8": tm.makeIntIndex(100, dtype="int8"),
"int16": tm.makeIntIndex(100, dtype="int16"),
"int32": tm.makeIntIndex(100, dtype="int32"),
"int64": tm.makeIntIndex(100, dtype="int64"),
"uint8": tm.makeUIntIndex(100, dtype="uint8"),
"uint16": tm.makeUIntIndex(100, dtype="uint16"),
"uint32": tm.makeUIntIndex(100, dtype="uint32"),
"uint64": tm.makeUIntIndex(100, dtype="uint64"),
"float32": tm.makeFloatIndex(100, dtype="float32"),
"float64": tm.makeFloatIndex(100, dtype="float64"),
"bool-object": tm.makeBoolIndex(10).astype(object),
"bool-dtype": Index(np.random.randn(10) < 0),
"complex64": tm.makeNumericIndex(100, dtype="float64").astype("complex64"),
"complex128": tm.makeNumericIndex(100, dtype="float64").astype("complex128"),
"categorical": tm.makeCategoricalIndex(100),
"interval": tm.makeIntervalIndex(100),
"empty": Index([]),
"tuples": MultiIndex.from_tuples(zip(["foo", "bar", "baz"], [1, 2, 3])),
"mi-with-dt64tz-level": _create_mi_with_dt64tz_level(),
"multi": _create_multiindex(),
"repeats": Index([0, 0, 1, 1, 2, 2]),
"nullable_int": Index(np.arange(100), dtype="Int64"),
"nullable_uint": Index(np.arange(100), dtype="UInt16"),
"nullable_float": Index(np.arange(100), dtype="Float32"),
"nullable_bool": Index(np.arange(100).astype(bool), dtype="boolean"),
"string-python": Index(pd.array(tm.makeStringIndex(100), dtype="string[python]")),
}
is where you should start.

A word of caution, though:
This can get annoying/hard fast depending on how many tests fail.

@SanjithChockan
Copy link
Contributor

take

@segwhat
Copy link

segwhat commented Jul 12, 2023

@SanjithChockan how's it going?

@PurnashisHazra
Copy link

Can I take this up?

@PurnashisHazra
Copy link

take

@SanjithChockan SanjithChockan removed their assignment Jul 12, 2023
@josephwillard
Copy link

@PurnashisHazra any chance to take a look at this yet?

@josephwillard
Copy link

take

@yeetnbeet
Copy link

I see the Last Pull went stale / this has been dead for over a month - I'm going to take a look at what tests fail this weekend

@natmokval
Copy link
Contributor

I would like to work on this.

@shriyase
Copy link

I'd like to work on this

@Pranav-Wadhwa
Copy link
Contributor

take

@Pranav-Wadhwa
Copy link
Contributor

@natmokval are you still working on this?

@natmokval
Copy link
Contributor

@Pranav-Wadhwa, yes, I am still working on this issue. I am now waiting for a review of my PR.

@moji-2024
Copy link

take

@moji-2024 moji-2024 removed their assignment Aug 18, 2024
@gabriale99
Copy link

take

@gabriale99 gabriale99 removed their assignment Sep 11, 2024
@brandonmonge
Copy link

take

@brandonmonge brandonmonge removed their assignment Dec 3, 2024
@yoav-edelist
Copy link

take

@pelagiavlas
Copy link

Hi! can i take this?

@xaris96
Copy link

xaris96 commented Mar 23, 2025

take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Index Related to the Index class or subclasses Testing pandas testing functions or related to the test suite
Projects
None yet