Skip to content

Instantly share code, notes, and snippets.

@eric-czech
Created March 4, 2024 16:49
Show Gist options
  • Save eric-czech/44a9054e0d95b2fa9de3d37ba01a7527 to your computer and use it in GitHub Desktop.
Save eric-czech/44a9054e0d95b2fa9de3d37ba01a7527 to your computer and use it in GitHub Desktop.
Export PMDB-BQ publication dates
(
pd.read_gbq(
"SELECT pmid, EXTRACT(YEAR from pub_date) AS pub_year FROM `pmdb-bq.pmdb.article` WHERE pub_date IS NOT NULL",
use_bqstorage_api=True
)
.to_parquet("pub_years.parquet")
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment