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









share|improve this question




























    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









    share|improve this question


























      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









      share|improve this question















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 21 hours ago









      James Z

      11.1k71735




      11.1k71735










      asked 22 hours ago









      user10468005

      315




      315





























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          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






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Costa Masnaga

          Fotorealismo

          Sidney Franklin