1

I'm trying out dexplot functionality and running into an issue with variable order. I'm looking to count the number of observations that fall within the day of week in the dataset. Like this:

dxp.count('day_of_week',data=df,x_order=['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'])

However, the order doesn't change. It works fine for dxp.bar, but when I try that option I don't get the correct counts of the data.

I know dexplot is new so open to suggestions

paranormaldist
  • 489
  • 5
  • 16
  • 1
    Please add sample data. See [How to provide a reproducible copy of your DataFrame using `df.head(30).to_clipboard(sep=',')`](https://stackoverflow.com/questions/52413246), then **[edit] your question**, and paste the clipboard into a code block. Always provide a [mre] **with code, data, errors, current output, and expected output, as text**. Only plot images are okay. – Trenton McKinney Sep 30 '20 at 07:51

1 Answers1

1

Ran into the same challenge: it seems that the dxp.count function doesn't support the x_order (and others) functions that are available for dxp.bar

To solve, I found a way to use the dxp.bar function. Specifically, I added a "counter" column to my dataframe and then was able to use the dxp.bar function with y="counter" and x="day_of_week" (in your example).

Dharman
  • 30,962
  • 25
  • 85
  • 135