Question: HTML and inline JS code:

```
<a onclick='show(user)'>${user.firstName + " " + user.lastName}</a>

```

Inside this show function I am passing an object User which has 5-6 properties, but when I used debugger it is not showing me as an object.

I also tried this , and this is showing be user as object in debugger but I am getting uncaught syntax error.

```
<a onclick='show(${user})'>${user.firstName + " " + user.lastName}</a>

```

I want to pass it as object so that i can utilise its properties.

```js
const displayUsers = (users) => {
    const htmlString = users
        .map((user) => {
            debugger;
            return `
            <li>
                <a onclick='show(user)'>${user.firstName + " " + user.lastName}</a>

            </li>
        `;
        })
        .join('');
    usersList.innerHTML = htmlString;

    console.log(users, 'list')
    // console.log(htmlString)
};
function show(user)
{
    alert(user);
 console.log( user.aonId);

};
```

Answer: 
We can use transform here with groupby:

```py
s = df["Business hours"].eq("Yes").groupby(df["Date"]).transform("Sum")
df[s >= 7]

```
Try groupby filter function :

```
def filter_rows(x):
    try:
        x['Business hours'].value_counts()['Yes'] >= 7
        return True
    except KeyError as e:
        return False
df = df.groupby('Date').filter(filter_rows)

```