Created
November 10, 2021 22:28
-
-
Save joseberlines/5826d02e6d1b42a83e4ba7d7ddb39385 to your computer and use it in GitHub Desktop.
using_pandas.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df = pd.DataFrame(L).set_index('name') | |
df.loc[['e4']].reset_index().to_dict('records') | |
#1.09 ms ± 13.7 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) | |
df.loc[['e9']].reset_index().to_dict('records') | |
#1.1 ms ± 22.2 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment