I've written a scraper in python to parse different names from a webpage. As I'm very new to panda so can't understand how to write data in a csv file properly. The way I've written my script does scrape desired names but in case of writing to a csv file it only write the last name. Any help on this will be vastly appreciated. Thanks in advance.

```
import requests ; from bs4 import BeautifulSoup
import pandas as pd

res = requests.get('https://bytes.com/topic/python/answers/596974-socket-error-10061-connection-refused').text
soup = BeautifulSoup(res,"lxml")
for name in soup.select(".smallfont a"):
    item = pd.DataFrame([name.text])[0]
    item.to_csv('file.csv')
    print(item)

```