{"id":26554013,"url":"https://github.com/beliavsky/dataframe","last_synced_at":"2026-01-05T13:02:40.887Z","repository":{"id":276383646,"uuid":"929133104","full_name":"Beliavsky/DataFrame","owner":"Beliavsky","description":"DataFrame for Fortran for floating point data","archived":false,"fork":false,"pushed_at":"2025-03-21T13:47:24.000Z","size":215,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-21T14:26:45.414Z","etag":null,"topics":["dataframe","fortran","modern-fortran","statistics"],"latest_commit_sha":null,"homepage":"","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Beliavsky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-07T21:39:49.000Z","updated_at":"2025-03-21T13:47:27.000Z","dependencies_parsed_at":"2025-02-07T22:31:45.917Z","dependency_job_id":"39d66b70-01bd-4055-a5fe-d9c6b2c05d5a","html_url":"https://github.com/Beliavsky/DataFrame","commit_stats":null,"previous_names":["beliavsky/dataframe"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beliavsky%2FDataFrame","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beliavsky%2FDataFrame/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beliavsky%2FDataFrame/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beliavsky%2FDataFrame/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Beliavsky","download_url":"https://codeload.github.com/Beliavsky/DataFrame/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244937743,"owners_count":20535124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dataframe","fortran","modern-fortran","statistics"],"created_at":"2025-03-22T09:38:45.471Z","updated_at":"2026-01-05T13:02:40.822Z","avatar_url":"https://github.com/Beliavsky.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DataFrame\n`DataFrame` is a Fortran derived type with indices, columns, and values of type `integer`, `character`, and `real(kind=dp)`. `Table` is similar but has indices of type `character`. With the DataFrame and Table and associated procedures, it is simple to read CSV files and compute and display associated statistics. For example, the [program](https://github.com/Beliavsky/DataFrame/blob/main/xdataframe_stats.f90)\n\n```fortran\nprogram xdataframe_stats\nuse       dataframe_mod, only: DataFrame, print_summary, operator(*)\nuse dataframe_stats_mod, only: simple_ret\nuse     table_stats_mod, only: basic_stats_table, corr_table\nuse           table_mod, only: Table, display\nuse kind_mod, only: dp\nimplicit none\ncharacter (len=*), parameter :: data_file = \"spy_efa_eem_tlt.csv\"\ntype(DataFrame) :: df, df_ret\ntype(Table) :: ret_stats\nprint \"('data file: ', a)\", trim(data_file)\ncall df%read_csv(data_file)\ncall print_summary(df, fmt_trailer=\"()\")\ndf_ret = 100.0_dp*simple_ret(df)\nret_stats = basic_stats_table(df_ret%values, df_ret%columns, \u0026\n   index_name=\"returns\")\ncall display(ret_stats, fmt_trailer=\"()\")\ncall display(corr_table(df_ret%values,df_ret%columns), \u0026\n   title=\"return correlations\")\nend program xdataframe_stats\n```\n\nreads historical daily closing prices for a few ETFs from a CSV file, which were obtained using the Python script `xget_prices_yahoo.py`. (The dates from the downloaded data file were transformed from YYYY-MM-DD format to YYYYMMDD to simplify reading them in Fortran.) The program then computes returns and prints statistics on those returns, including a correlation matrix. The output is\n\n```\ndata file: spy_efa_eem_tlt.csv\n#rows, columns: 5490 4\nfirst, last indices: 20030414 20250205\nfirst, last columns: SPY TLT\n\n             returns        SPY        EFA        EEM        TLT\nmean                     0.0492     0.0363     0.0469     0.0180\nsd                       1.1693     1.3104     1.7245     0.9159\nskew                    -0.0872    -0.0650     0.5054     0.0797\nkurt                    15.2201    14.3123    18.2294     3.4888\nmin                    -10.9424   -11.1633   -16.1661    -6.6682\nmax                     14.5198    15.8880    22.7700     7.5195\n\nreturn correlations\n                            SPY        EFA        EEM        TLT\nSPY                      1.0000     0.8832     0.8183    -0.3127\nEFA                      0.8832     1.0000     0.8679    -0.2848\nEEM                      0.8183     0.8679     1.0000    -0.2662\nTLT                     -0.3127    -0.2848    -0.2662     1.0000\n```\nThe ETFs are\n```\n   SPY -- S\u0026P 500 (U.S. stocks)\n   EFA -- iShares MSCI EAFE (foreign developed market stocks)\n   EEM -- iShares MSCI Emerging Markets (emerging market stocks)\n   TLT -- iShares 20+ Year Treasury Bond (U.S. long-term government bonds)\n```\nThe pairwise correlations of returns of all the stock ETFs (SPY, EFA, EEM) all exceed 0.8, while they are negatively correlated to TLT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeliavsky%2Fdataframe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeliavsky%2Fdataframe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeliavsky%2Fdataframe/lists"}