>>> myseries[myseries == 7]
3 7
dtype: int64
>>> myseries[myseries == 7].index[0]
3
Though I admit that there should be a better way to do that, but this at least avoids iterating and looping through the object and moves it to the C level.
More Related Contents:
- How to one-hot-encode from a pandas column containing a list?
- Rename Pandas DataFrame Index
- Pandas groupby cumulative sum
- What is the fastest way to upload a big csv file in notebook to work with python pandas?
- Pandas DataFrame concat vs append
- Pandas counting and summing specific conditions
- Convert row to column header for Pandas DataFrame,
- Use AWS Glue Python with NumPy and Pandas Python Packages
- Select multiple ranges of columns in Pandas DataFrame
- Pandas read csv file with float values results in weird rounding and decimal digits
- pandas – filter dataframe by another dataframe by row elements
- How to set some xlim and ylim in Seaborn lmplot facetgrid
- Left justify string values in a pandas DataFrame
- How to copy/paste DataFrame from Stack Overflow into Python
- pandas 0.21.0 Timestamp compatibility issue with matplotlib
- Override global variable inside function not working with Spyder 4
- Pandas: Datetime Improperly selecting day as month from date [duplicate]
- join or merge with overwrite in pandas
- Create new column based on values from other columns / apply a function of multiple columns, row-wise in Pandas
- Computing diffs within groups of a dataframe
- Specifying date format when converting with pandas.to_datetime
- Nested Dictionary to MultiIndex pandas DataFrame (3 level)
- Grouped Bar graph Pandas
- KeyError when indexing Pandas dataframe
- how to save a pandas DataFrame to an excel file?
- How to filter a DataFrame column of lists for those that contain a certain item
- Excel VLOOKUP equivalent in pandas
- Seaborn multiple barplots
- Add density curve on the histogram
- pandas scatter plotting datetime