peerchemist / finta

Common financial technical indicators implemented in Pandas.
GNU Lesser General Public License v3.0
2.14k stars 694 forks source link

Misleading documentation in readme.md #42

Closed xmatthias closed 5 years ago

xmatthias commented 5 years ago

I think the readme contains a slightly wrong and misleading section.

From the readme.md:

select only price column, resample by time period and return daily ohlc (you can choose different time period) ohlc = df["close"].resample("24h").ohlc()

This does not work / make sense, since pd.Series does not have a ohlc() method.

I'm not sure what this tries to accomplish either, since utils.resample does require a dataframe, not a single series.

https://github.com/peerchemist/finta/blob/21a424291e8177ec1e9031b94f45de25ac31927d/finta/utils.py#L14-L19

2nd misleading section:

standardize column names of your source df.columns = ["date", 'close', 'volume']

I think this should include all ohlc[v] columns - to be in line with the comment 2 lines before that:

finta expects properly formated ohlc DataFrame, with column names in lowercase: ["open", "high", "low", close"] and ["volume"] for indicators that expect ohlcv input.

peerchemist commented 5 years ago

True, README is quite old and pandas used to work quite differently back then.