Jan-09-2022, 05:47 AM
Scraping Columns with Pandas (Column Entries w/ more than 1 word writes two columns)
My code is the following:
Once the file is written; which works great. Any entries in any column; for instance as shown in the following screen shots in Libre Calc is writing the names into multiple columns. This makes my obstacles difficult. How do I remedy this?
Screenshot #1:
Screenshot #2:
Thank you everyone for this forum!
My code is the following:
import pandas as pd url = "https://en.wikipedia.org/wiki/List_of_counties_in_Alabama" tables = pd.read_html(url) tables[1] print(tables[1]) df = tables[1] df.to_csv('AL_Counties.csv', sep='\t', encoding='utf-8', index=False)Using Pandas,
Once the file is written; which works great. Any entries in any column; for instance as shown in the following screen shots in Libre Calc is writing the names into multiple columns. This makes my obstacles difficult. How do I remedy this?
Screenshot #1:
Screenshot #2:
Thank you everyone for this forum!
“And one of the elders saith unto me, Weep not: behold, the Lion of the tribe of Juda, the Root of David, hath prevailed to open the book,...” - Revelation 5:5 (KJV)
“And oppress not the widow, nor the fatherless, the stranger, nor the poor; and ...” - Zechariah 7:10 (KJV)
#LetHISPeopleGo
“And oppress not the widow, nor the fatherless, the stranger, nor the poor; and ...” - Zechariah 7:10 (KJV)
#LetHISPeopleGo