Python Forum
How can I use the following script?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I use the following script?
#8
(Mar-17-2021, 01:50 AM)brunolelli Wrote: What do you think about it? Is it appropriate?
If it give you what wanted then is okay👍
I can not run it as it not all code,line length get way to long.
ofertas = len(result)
print(ofertas)

df = pd.DataFrame(
    [],
    columns=[
        "Address",
        "Price",
        "Total Area",
        "Bathrooms",
        "Badrooms",
        "Vacancies",
        "Description",
    ],
)

for i in range(ofertas):
    df = df.append(
        {
            "Address": result[i].address,
            "Price": result[i].price,
            "Total Area": result[i].total_area_m2,
            "Bathrooms": result[i].bathrooms,
            "Badrooms": result[i].bedrooms,
            "Vacancies": result[i].vacancies,
            "Description": result[i].description,
        },
        ignore_index=True,
    )

df.to_csv(r"C:\Users\bruno\Desktop\FII\Zap.csv", index=False, header=True, sep=";",)
print(df)
brunolelli likes this post
Reply


Messages In This Thread
How can I use the following script? - by brunolelli - Mar-16-2021, 11:33 PM
RE: How can I use the following script? - by snippsat - Mar-17-2021, 09:25 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020