Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

write to a pandas dataframe? #6

Open
shantanuo opened this issue Jul 25, 2020 · 0 comments
Open

write to a pandas dataframe? #6

shantanuo opened this issue Jul 25, 2020 · 0 comments

Comments

@shantanuo
Copy link

I was able to use the following line as expected.

conv = Converter()
conv.convert(res["hits"]["hits"], Writer(file="test.xlsx"))

That was nice. But I will prefer to write to a pandas dataframe. Something like this?

conv.convert(res["hits"]["hits"], Writer(df)

I can open excel file using pandas like this...

df = pd.read_excel("test.xlsx", header=list(range(9)), parse_dates=True)

But in this case, I need to find out the number of rows where the header is written. The "conv" object already knows it and can convert into multi-level column header in pandas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant