Question: I have a big csv file and I would like to combine rows with the same id#.
For instance, this is what my csv shows right now.
[![enter image description here](https://i.stack.imgur.com/RyYYh.png)](https://i.stack.imgur.com/RyYYh.png)

and I would like it to be like this:

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

how can I do this using pandas?

Answer: 
Try the execute script method which can have a better chance when getting that error. Also you could use implicitly wait instead of time waits to be more effecient.

```
driver.implicitly_wait(5)

addressbox = driver.find_element_by_xpath('/html/body/div[9]/div/div/div[2]/div/div[1]/div/div/div/div/div[3]/div/div/div[1]')

driver.execute_script("arguments[0].click();", addressbox)

```
Generally `<div>` elements aren't ***clickable***. Presumably you need to crosscheck if the following element is your desired element:

```
<div class="c-sk-modal_footer_actions">

```

Where as, the element from your second attempt:

```
<div class="c-button c-button--primary c-button--medium...">

```

looks as a perfect **clickable** candidate.

---

Solution
--------

The desired element is a [React](https://stackoverflow.com/questions/62890212/scraping-a-react-table-using-selenium/62890615#62890615) element, so to click() on the element you need to induce [WebDriverWait](https://stackoverflow.com/a/59130336/7429447) for the [*element\_to\_be\_clickable()*](https://stackoverflow.com/a/54194511/7429447) and you can use either of the following [*locator strategies*](https://stackoverflow.com/a/48056120/7429447):

* Using *CSS\_SELECTOR*:

```
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".c-button.c-button--primary.c-button--medium"))).click()

```
* Using *XPATH*:

```
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//*[@class='c-button c-button--primary c-button--medium']"))).click()

```
* **Note**: You have to add the following imports :

```
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC

```