I am converting some code from Pandas to pyspark. In pandas, lets imagine I have the following mock dataframe, df:

[![enter image description here](https://i.stack.imgur.com/AEAO1.png)](https://i.stack.imgur.com/AEAO1.png)

And in pandas, I define a certain variable the following way:

```
value = df.groupby(["Age", "Siblings"]).size()

```

And the output is a series as follows:

[![enter image description here](https://i.stack.imgur.com/QvkPO.png)](https://i.stack.imgur.com/QvkPO.png)

However, when trying to covert this to pyspark, an error comes up: `AttributeError: 'GroupedData' object has no attribute 'size'`. Can anyone help me solve this?