-1

I want to extract the highest price but I dont know how here is my code:

import pandas
import pandas_datareader.data as pdr
import datetime as dt

start = dt.datetime(2021,1,29)
end = dt.datetime(2021,2,18)
df = pdr.DataReader('BTC-USD','yahoo',start,end)

it returns cloumns and i want to print just the highest price

2

2 Answers 2

2

If you're interested in the maximal values of the High column, you can calculate it like:

df['High'].max()
Sign up to request clarification or add additional context in comments.

Comments

0

Try with idxmax

maxrow = df.loc[df['col'].idxmax()]

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.