2

I already parsed datas from csv. And now trying to insert those data to another file which is "macOS .pages"

So the tricky part is, there is more than one page in the file(.pages) and each page has a topic. Of course I parsed the data with the topics(you can see it here). What I am trying to do here, if the parsed data's topic matches the page's topic. Then insert specific data into that page's specific column. For example at the top of the page there is a topic. and inside of the page there are columns. The last right columns. I am trying to insert the datas...

So is it possible to this? And if it's possible then how?

the csv export with pandas:

import pandas as pd

df = pd.read_csv("datas.csv", index_col=0) 
df = df.drop(columns=df.columns[df.iloc[0].isnull()]._data)
df_out = df.loc['利用額(Fee抜き)']

df_out.reset_index()
df_out = df_out.drop(columns=['クライアント名'])

df_out.to_csv('ss.csv')

From here, what should I do?

Sample:

This is what parsed CSV file looks like.

----------------------
Topic 1     123123
----------------------
Topic 1     123123
----------------------
Topic 2     456456
----------------------
Topic 2     456456

And in the .pages document. Each has a topic:

Topic 1

bla bla bla bla

Table Header1| Table-header2| Table-Header3
Data         | Data         | Data
Data         | Data         | Data
Data         | Data         | Data
Data         | Data         | 
Data         | Data         |  
2
  • will you show us your sample data here , and your expected output ..(It is hard for us to address the problem with pictures . ) Commented Jan 15, 2019 at 4:38
  • I updated the question. As you see there is empty spaces in the .pages table-header3. What I am trying to do here. how insert the data to those empty spaces if the topics matches...? @W-B Commented Jan 15, 2019 at 5:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.