Skip to content
Texxl

From junior to geek the road is sleek

extract

Get actual value from pandas dataframe instead of object with index

February 2, 2022 by admin

.item() will do the job: p1 = df[df[“column2”]==df.column2.max()].column1.item() print(p1) This way you can extract the actual value from pandas dataframe and store it in variable for later use.

Categories Pandas Tags dataframe, extract, get, pandas, value

Categories

  • C#
  • Database
    • MariaDB
    • mySQL
  • Networking
    • Linux
    • nginx
    • Windows Server
  • Python
    • Anaconda
    • Cython
    • dask
    • Machine Learning
    • Numba
    • numpy
    • Pandas
    • plotly
  • Software
  • Uncategorized
  • Wordpress

Popular Posts:

  • AttributeError: ‘float’ object has no attribute ’round’
  • Find out dataframe index value under a certain condition
  • Get actual value from pandas dataframe instead of object with index
  • np.arange doesn’t include maximum value
  • List comprehension from python dictionary

Archives

  • May 2022 (1)
  • February 2022 (4)
  • December 2021 (5)
  • November 2021 (15)
  • October 2021 (5)
  • September 2021 (1)
  • August 2021 (3)
  • July 2021 (1)
  • June 2021 (10)
  • May 2021 (8)
  • April 2021 (5)

9software.com - your one-stop software shop!

© 2022 Texxl • Built with GeneratePress