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

Figure Builder Error #148

Open
Somtochukwu-Achikanu opened this issue Apr 1, 2024 · 1 comment
Open

Figure Builder Error #148

Somtochukwu-Achikanu opened this issue Apr 1, 2024 · 1 comment
Labels

Comments

@Somtochukwu-Achikanu
Copy link

Somtochukwu-Achikanu commented Apr 1, 2024

from whatstk import FigureBuilder
from plotly.offline import plot
fb = FigureBuilder(chat)
fig = fb.user_interventions_count_linechart(cumulative=True, title='User inteventions count (cumulative)')
plot(fig)

The error it is throwing..

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-103-c1b1c4d66314> in <cell line: 4>()
      2 from plotly.offline import plot
      3 fb = FigureBuilder(chat)
----> 4 fig = fb.user_interventions_count_linechart(cumulative=True, title='User inteventions count (cumulative)')
      5 plot(fig)

4 frames
/usr/local/lib/python3.10/dist-packages/pandas/core/indexes/accessors.py in __new__(cls, data)
    510             return PeriodProperties(data, orig)
    511 
--> 512         raise AttributeError("Can only use .dt accessor with datetimelike values")

AttributeError: Can only use .dt accessor with datetimelike values

please note the name of my dataframe is chat.

@lucasrodes lucasrodes added the bug label Apr 1, 2024
@lucasrodes
Copy link
Owner

Hi @Somtochukwu-Achikanu, thanks for the interest in whatstk.

It seems like your dataframe might not have the appropriate data types? It should have column date of type datetime. Could you verify this? Maybe if you share a snippet (with modified texts if needed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants