Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plotting erros #173

Closed
gabrielp18 opened this issue Aug 1, 2023 · 1 comment
Closed

Plotting erros #173

gabrielp18 opened this issue Aug 1, 2023 · 1 comment

Comments

@gabrielp18
Copy link

gabrielp18 commented Aug 1, 2023

When running "plot_bar", because the new versions of python dataframe.append doesn't work anymore and needs to be replaced for concat, i got the following error:
`---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/2674597346.py) in ?()
----> 1 ax = rp.plot_bar(w,
2 title='Portfolio',
3 kind="v",
4 others=0.05,

riskfolio/src/PlotFunctions.py) in ?(w, title, kind, others, nrow, cpos, cneg, cothers, height, width, ax)
871 item = pd.DataFrame(["Others", a1, a2]).T
872 item.columns = ["labels", "abs_values", "values"]
873 sizes2 = sizes2[sizes2.index <= l2]
874 sizes2 = sizes2.sort_values(by=["values"], ascending=False)
--> 875 sizes2 = sizes2.append(item)
876 else:
877 sizes2 = sizes2.sort_values(by=["values"], ascending=False)
878

pandas/core/generic.py) in ?(self, name)
5985 and name not in self._accessors
5986 and self._info_axis._can_hold_identifiers_and_holds_name(name)
5987 ):
5988 return self[name]
-> 5989 return object.getattribute(self, name)

AttributeError: 'DataFrame' object has no attribute 'append'`

@dcajasn
Copy link
Owner

dcajasn commented Aug 1, 2023

Hi @gabrielp18,

I've just fixed the error, download version 4.4.1.

Best,
Dany

@dcajasn dcajasn closed this as completed Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants