python 'gnomAD_DB'
0
0
Entering edit mode
17 months ago
sooni ▴ 20

Hello. I have a question about 'gnomAD_DB' package of Python.

How to save query result as csv file?

This is my code.

test_df = db.get_info_from_df(dummy_var_df, "AF")

I want to make the result of 'test_df' into a csv file. What should I do?

test_df.to_csv('my_data.csv', index =  False)

I tried running the code above, but it doesn't seem to save. I can't find the file.

Please help me.

gnomAD_DB python • 571 views
ADD COMMENT
0
Entering edit mode

The function get_info_from_df returns a Pandas Series, so your code is correct. Could you post the output of dummy_var_df.shape and len(test_df) ?

ADD REPLY
0
Entering edit mode

I use 'jupyter notebook'. I tried running both codes, but no information came up. What should I do in this case?

enter image description here

The image above is my jupyter notebook window.

ADD REPLY

Login before adding your answer.

Traffic: 2070 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6