Skip to content

Methods

categories

List of categories.

Returns:

Type Description
ListStr

List of the indicator categories.




constants

Concatenate / Drop constant(s) to the DataFrame.

Parameters:

Name Type Description Default
append bool

Concatenate if True. Drop if False. Default: None

required
values Array

List/Numpy array of values to append/drop from the DataFrame.

required

Returns:

Type Description
(Series, DataFrame, None)

Depends upon parameters.

See Also




datetime_ordered

DataFrame DateTime ordered?

Returns:

Type Description
bool

True if the DataFrame is DateTime ordered, otherwise False.




help

Help!

Parameters:

Name Type Description Default
s str

String to search for. Default: ""

''

Returns:

Type Description
None | TextIO

Opens web browser to relevant Pandas TA website page or prints all search keywords.




indicators

List indicators.

Parameters:

Name Type Description Default
as_list bool

Return as a list. Default: False

None
exclude ListStr

The passed in list will be excluded from the indicators list. Default: None

None

Returns:

Type Description
TextIO | ListStr

Prints list or returns a ListStr.




last_run

Detailed string of last run time.

Returns:

Type Description
str

Detailed date and time of the lastest run.




reverse

Reverse the DataFrame inplace.

Returns:

Type Description
None

DataFrame reversed inplace.




study

Applies the ta listed in a Study.

Other Parameters:

Name Type Description
chunksize int

Multiprocessing Pool chunksize. Default: df.ta.cores

cores int

Number of Multiprocessing cores. Default: df.ta.cores

exclude ListStr

List of indicator names. Default: []

ordered bool

Run ta in order. Default: True

returns bool

Return the DataFrame. Default: False

timed bool

Print the process time. Default: False

verbose bool

More verbose output. Default: False

Multiprocessing

Multiprocessing is not viable or efficient for some cases. Testing is required per case. See Multiprocessing for more information.




ticker

Download Historical ohlcv data as a Pandas DataFrame if yfinance package is installed. It also can run a ta.Study afterwards.

Parameters:

Name Type Description Default
ticker str

Any string for a ticker you would use with yfinance. Default: "SPY"

None
period str

See the yfinance history() method for more options. Default: "max"

None
interval str
None
study Study | str

After downloading, apply Study Default: None

None
proxy dict

Proxy dictionary. Default: {}

None
timed bool

Print download time to stdout. Default: False

False

Returns:

Type Description
DataFrame | None

ohlcv df or None

YFinance history parameters
Example
import panadas as pd
import pandas_ta as ta

# Simple
df = pd.DataFrame().ta.ticker("SPY", period="2y", timed=True)

# Built In Study
df = pd.DataFrame().ta.ticker("SPY", period="2y", study=ta.AllStudy, timed=True)




to_utc

Set the DataFrame index to UTC.

Returns:

Type Description
None

Performs the operation.