How can I do this without loosing the gender column? drdata =…
Jump to turn (8)
- 1How can I do this without loosing the gender column? drdata = drdata['aspects'].
- 2how can I make the bars thinner in matplot lib seaborn
- 3In this funtion, flip the x and y axis:
- 4def barplottopicpergender(df, topicorder, xcol='toptopicid', col='count', title=
- 5Why does this show an empty graph? topicgendercounts = drdata.groupby(['aspects'
- 6df['aspects'].unique() PyDev console: using IPython 8.31.0 Out[1]: array([1, 2,
- 7Nope. I got this:
- 8print(df['aspects'].dtype) PyDev console: using IPython 8.31.0 int64 df Out[3]:
- User
How can I do this without loosing the gender column? dr_data = dr_data['aspects'].explode().dropna().astype(int)
Here is the dataframe: dr_data PyDev console: using IPython 8.31.0 Out[1]: tid tid_order ... domestic_resilience aspects 3 53 00053_3 ... True [1, 2, 5, 6] 4 53 00053_4 ... True [1, 5, 6] 5 53 00053_8 ... True [2] 6 53 00053_11 ... True [1, 2, 5, 6] 7 69 00069_2 ... True [2, 3, 6] ... ... ... ... ... ... 2161 852 00852_8 ... True [] 2162 852 00852_10 ... True [] 2163 852 00852_11 ... True [] 2164 852 00852_15 ... True [] 2165 917 00917_13 ... True [2]
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.