How to write csv from two DataFrame in python
up vote
0
down vote
favorite
I am trying to write data in expected data format. I have two data frames and want to write as per expected output format.call
Below are some examples and data frame details
first Dataframe -
df_1
0 1 2 3 4 5 6 7 8 9 10
0 1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30
0 1 2 3 4 5 6 7 8 9 10
0 2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70
Second DataFrame -
df_2
0 1 2 3 4
0 1 1.5 BHK 44.57 1 1
1 2 1.5 BHK 38.09 1 1
2 3 2 BHK 51.01 4 2
3 4 2 BHK 61.21 4 3
4 5 2.5 BHK 43.16 1 1
5 6 1 BHK 31.97 1 1
6 7 1.5 BHK 37.30 2 2
7 8 1.5 BHK 41.12 1 1
0 1 2 3 4
0 1 2 BHK 85.73 15 14
1 2 2 BHK 92.27 15 15
2 3 3.5 BHK 126.20 2 2
Code:
url_row_index=0
url = each.split(separator)[url_row_index]
df_url = pd.read_csv(pd.compat.StringIO(url), header=None)
html=requests.get(url).content
soup=BeautifulSoup(html, 'lxml')
table = soup.find_all('table')[3]
data =
for row in table.find_all("tr", recursive=False)[1:]:
row_1 = [cell.get_text(strip=True) for cell in row.find_all("td")]
data.append(row_1)
for i in range(0, len(data), 4):
tableRows = data[i]
df = pd.DataFrame(tableRows)
df = df.T
print (df)
count_table_1 = soup.find_all("table",{"class":"table table-bordered table-responsive table-striped"})
for j in range(2, len(count_table_1), 1):
table_1 = soup.find_all("table",{"class":"table table-bordered table-responsive table-striped"})[j]
Table_1_data = [[td.text for td in row.find_all("td")] for row in table_1.find_all("tr")[1:]]
df_1 = pd.DataFrame(Table_1_data)
print (df_1)
df_2 = pd.concat([df_url, df, df_1], axis=1)
df_2.fillna(method='ffill', inplace=True)
Current output:
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 1 1.5 BHK 44.57 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 2 1.5 BHK 38.09 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 3 2 BHK 51.01 4 2
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 4 2 BHK 61.21 4 3
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 5 2.5 BHK 43.16 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 6 1 BHK 31.97 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 7 1.5 BHK 37.3 2 2
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 8 1.5 BHK 41.12 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 1 2 BHK 85.73 15 14
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 2 2 BHK 92.27 15 15
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 3 3.5 BHK 126.2 2 2
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 1 1.5 BHK 44.57 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 2 1.5 BHK 38.09 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 3 2 BHK 51.01 4 2
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 4 2 BHK 61.21 4 3
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 5 2.5 BHK 43.16 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 6 1 BHK 31.97 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 7 1.5 BHK 37.3 2 2
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 8 1.5 BHK 41.12 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 1 2 BHK 85.73 15 14
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 2 2 BHK 92.27 15 15
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 3 3.5 BHK 126.2 2 2
Expected output:
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 1 1.5 BHK 44.57 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 2 1.5 BHK 38.09 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 3 2 BHK 51.01 4 2
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 4 2 BHK 61.21 4 3
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 5 2.5 BHK 43.16 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 6 1 BHK 31.97 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 7 1.5 BHK 37.3 2 2
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 8 1.5 BHK 41.12 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 1 2 BHK 85.73 15 14
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 2 2 BHK 92.27 15 15
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 3 3.5 BHK 126.2 2 2
python python-3.x pandas
add a comment |
up vote
0
down vote
favorite
I am trying to write data in expected data format. I have two data frames and want to write as per expected output format.call
Below are some examples and data frame details
first Dataframe -
df_1
0 1 2 3 4 5 6 7 8 9 10
0 1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30
0 1 2 3 4 5 6 7 8 9 10
0 2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70
Second DataFrame -
df_2
0 1 2 3 4
0 1 1.5 BHK 44.57 1 1
1 2 1.5 BHK 38.09 1 1
2 3 2 BHK 51.01 4 2
3 4 2 BHK 61.21 4 3
4 5 2.5 BHK 43.16 1 1
5 6 1 BHK 31.97 1 1
6 7 1.5 BHK 37.30 2 2
7 8 1.5 BHK 41.12 1 1
0 1 2 3 4
0 1 2 BHK 85.73 15 14
1 2 2 BHK 92.27 15 15
2 3 3.5 BHK 126.20 2 2
Code:
url_row_index=0
url = each.split(separator)[url_row_index]
df_url = pd.read_csv(pd.compat.StringIO(url), header=None)
html=requests.get(url).content
soup=BeautifulSoup(html, 'lxml')
table = soup.find_all('table')[3]
data =
for row in table.find_all("tr", recursive=False)[1:]:
row_1 = [cell.get_text(strip=True) for cell in row.find_all("td")]
data.append(row_1)
for i in range(0, len(data), 4):
tableRows = data[i]
df = pd.DataFrame(tableRows)
df = df.T
print (df)
count_table_1 = soup.find_all("table",{"class":"table table-bordered table-responsive table-striped"})
for j in range(2, len(count_table_1), 1):
table_1 = soup.find_all("table",{"class":"table table-bordered table-responsive table-striped"})[j]
Table_1_data = [[td.text for td in row.find_all("td")] for row in table_1.find_all("tr")[1:]]
df_1 = pd.DataFrame(Table_1_data)
print (df_1)
df_2 = pd.concat([df_url, df, df_1], axis=1)
df_2.fillna(method='ffill', inplace=True)
Current output:
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 1 1.5 BHK 44.57 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 2 1.5 BHK 38.09 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 3 2 BHK 51.01 4 2
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 4 2 BHK 61.21 4 3
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 5 2.5 BHK 43.16 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 6 1 BHK 31.97 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 7 1.5 BHK 37.3 2 2
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 8 1.5 BHK 41.12 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 1 2 BHK 85.73 15 14
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 2 2 BHK 92.27 15 15
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 3 3.5 BHK 126.2 2 2
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 1 1.5 BHK 44.57 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 2 1.5 BHK 38.09 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 3 2 BHK 51.01 4 2
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 4 2 BHK 61.21 4 3
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 5 2.5 BHK 43.16 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 6 1 BHK 31.97 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 7 1.5 BHK 37.3 2 2
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 8 1.5 BHK 41.12 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 1 2 BHK 85.73 15 14
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 2 2 BHK 92.27 15 15
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 3 3.5 BHK 126.2 2 2
Expected output:
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 1 1.5 BHK 44.57 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 2 1.5 BHK 38.09 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 3 2 BHK 51.01 4 2
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 4 2 BHK 61.21 4 3
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 5 2.5 BHK 43.16 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 6 1 BHK 31.97 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 7 1.5 BHK 37.3 2 2
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 8 1.5 BHK 41.12 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 1 2 BHK 85.73 15 14
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 2 2 BHK 92.27 15 15
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 3 3.5 BHK 126.2 2 2
python python-3.x pandas
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to write data in expected data format. I have two data frames and want to write as per expected output format.call
Below are some examples and data frame details
first Dataframe -
df_1
0 1 2 3 4 5 6 7 8 9 10
0 1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30
0 1 2 3 4 5 6 7 8 9 10
0 2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70
Second DataFrame -
df_2
0 1 2 3 4
0 1 1.5 BHK 44.57 1 1
1 2 1.5 BHK 38.09 1 1
2 3 2 BHK 51.01 4 2
3 4 2 BHK 61.21 4 3
4 5 2.5 BHK 43.16 1 1
5 6 1 BHK 31.97 1 1
6 7 1.5 BHK 37.30 2 2
7 8 1.5 BHK 41.12 1 1
0 1 2 3 4
0 1 2 BHK 85.73 15 14
1 2 2 BHK 92.27 15 15
2 3 3.5 BHK 126.20 2 2
Code:
url_row_index=0
url = each.split(separator)[url_row_index]
df_url = pd.read_csv(pd.compat.StringIO(url), header=None)
html=requests.get(url).content
soup=BeautifulSoup(html, 'lxml')
table = soup.find_all('table')[3]
data =
for row in table.find_all("tr", recursive=False)[1:]:
row_1 = [cell.get_text(strip=True) for cell in row.find_all("td")]
data.append(row_1)
for i in range(0, len(data), 4):
tableRows = data[i]
df = pd.DataFrame(tableRows)
df = df.T
print (df)
count_table_1 = soup.find_all("table",{"class":"table table-bordered table-responsive table-striped"})
for j in range(2, len(count_table_1), 1):
table_1 = soup.find_all("table",{"class":"table table-bordered table-responsive table-striped"})[j]
Table_1_data = [[td.text for td in row.find_all("td")] for row in table_1.find_all("tr")[1:]]
df_1 = pd.DataFrame(Table_1_data)
print (df_1)
df_2 = pd.concat([df_url, df, df_1], axis=1)
df_2.fillna(method='ffill', inplace=True)
Current output:
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 1 1.5 BHK 44.57 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 2 1.5 BHK 38.09 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 3 2 BHK 51.01 4 2
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 4 2 BHK 61.21 4 3
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 5 2.5 BHK 43.16 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 6 1 BHK 31.97 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 7 1.5 BHK 37.3 2 2
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 8 1.5 BHK 41.12 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 1 2 BHK 85.73 15 14
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 2 2 BHK 92.27 15 15
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 3 3.5 BHK 126.2 2 2
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 1 1.5 BHK 44.57 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 2 1.5 BHK 38.09 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 3 2 BHK 51.01 4 2
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 4 2 BHK 61.21 4 3
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 5 2.5 BHK 43.16 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 6 1 BHK 31.97 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 7 1.5 BHK 37.3 2 2
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 8 1.5 BHK 41.12 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 1 2 BHK 85.73 15 14
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 2 2 BHK 92.27 15 15
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 3 3.5 BHK 126.2 2 2
Expected output:
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 1 1.5 BHK 44.57 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 2 1.5 BHK 38.09 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 3 2 BHK 51.01 4 2
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 4 2 BHK 61.21 4 3
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 5 2.5 BHK 43.16 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 6 1 BHK 31.97 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 7 1.5 BHK 37.3 2 2
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 8 1.5 BHK 41.12 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 1 2 BHK 85.73 15 14
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 2 2 BHK 92.27 15 15
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 3 3.5 BHK 126.2 2 2
python python-3.x pandas
I am trying to write data in expected data format. I have two data frames and want to write as per expected output format.call
Below are some examples and data frame details
first Dataframe -
df_1
0 1 2 3 4 5 6 7 8 9 10
0 1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30
0 1 2 3 4 5 6 7 8 9 10
0 2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70
Second DataFrame -
df_2
0 1 2 3 4
0 1 1.5 BHK 44.57 1 1
1 2 1.5 BHK 38.09 1 1
2 3 2 BHK 51.01 4 2
3 4 2 BHK 61.21 4 3
4 5 2.5 BHK 43.16 1 1
5 6 1 BHK 31.97 1 1
6 7 1.5 BHK 37.30 2 2
7 8 1.5 BHK 41.12 1 1
0 1 2 3 4
0 1 2 BHK 85.73 15 14
1 2 2 BHK 92.27 15 15
2 3 3.5 BHK 126.20 2 2
Code:
url_row_index=0
url = each.split(separator)[url_row_index]
df_url = pd.read_csv(pd.compat.StringIO(url), header=None)
html=requests.get(url).content
soup=BeautifulSoup(html, 'lxml')
table = soup.find_all('table')[3]
data =
for row in table.find_all("tr", recursive=False)[1:]:
row_1 = [cell.get_text(strip=True) for cell in row.find_all("td")]
data.append(row_1)
for i in range(0, len(data), 4):
tableRows = data[i]
df = pd.DataFrame(tableRows)
df = df.T
print (df)
count_table_1 = soup.find_all("table",{"class":"table table-bordered table-responsive table-striped"})
for j in range(2, len(count_table_1), 1):
table_1 = soup.find_all("table",{"class":"table table-bordered table-responsive table-striped"})[j]
Table_1_data = [[td.text for td in row.find_all("td")] for row in table_1.find_all("tr")[1:]]
df_1 = pd.DataFrame(Table_1_data)
print (df_1)
df_2 = pd.concat([df_url, df, df_1], axis=1)
df_2.fillna(method='ffill', inplace=True)
Current output:
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 1 1.5 BHK 44.57 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 2 1.5 BHK 38.09 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 3 2 BHK 51.01 4 2
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 4 2 BHK 61.21 4 3
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 5 2.5 BHK 43.16 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 6 1 BHK 31.97 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 7 1.5 BHK 37.3 2 2
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 8 1.5 BHK 41.12 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 1 2 BHK 85.73 15 14
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 2 2 BHK 92.27 15 15
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 3 3.5 BHK 126.2 2 2
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 1 1.5 BHK 44.57 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 2 1.5 BHK 38.09 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 3 2 BHK 51.01 4 2
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 4 2 BHK 61.21 4 3
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 5 2.5 BHK 43.16 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 6 1 BHK 31.97 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 7 1.5 BHK 37.3 2 2
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 8 1.5 BHK 41.12 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 1 2 BHK 85.73 15 14
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 2 2 BHK 92.27 15 15
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 3 3.5 BHK 126.2 2 2
Expected output:
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 1 1.5 BHK 44.57 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 2 1.5 BHK 38.09 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 3 2 BHK 51.01 4 2
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 4 2 BHK 61.21 4 3
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 5 2.5 BHK 43.16 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 6 1 BHK 31.97 1 1
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 7 1.5 BHK 37.3 2 2
1 DURVANKUR Durvankur A wing 0 1 0 21 1 0 30 8 1.5 BHK 41.12 1 1
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 1 2 BHK 85.73 15 14
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 2 2 BHK 92.27 15 15
2 DURVANKUR Durvankur B wing 0 1 0 15 1 0 70 3 3.5 BHK 126.2 2 2
python python-3.x pandas
python python-3.x pandas
edited 21 hours ago
James Z
11.1k71735
11.1k71735
asked 22 hours ago
user10468005
315
315
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53349340%2fhow-to-write-csv-from-two-dataframe-in-python%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown