TidierFiles.jl
Tidier file reading and writing in Julia, modeled after the readr, haven, readxl, and writexl R packages.
Install / Use
/learn @TidierOrg/TidierFiles.jlREADME
TidierFiles.jl
<img src="docs/src/assets/logo.png" align="right" style="padding-left:10px;" width="150"/>What is TidierFiles.jl?
TidierFiles.jl is a 100% Julia implementation of the readr, haven, readxl, and writexl R packages.
Powered by the CSV.jl, XLSX.jl, ReadStatTables.jl, Arrow.jl, and Parquet2.jl packages, TidierFiles.jl aims to bring a consistent interface to the reading and writing of tabular data, including a consistent syntax to read files locally versus from the web and consistent keyword arguments across data formats.
Currently supported file types:
read_csvandwrite_csvread_tsvandwrite_tsvread_xlsxandwrite_xlsxread_delimandwrite_delimread_tableandwrite_tableread_fwfandfwf_emptyread_savandwrite_sav(.sav and .por)read_sasandwrite_sas(.sas7bdat and .xpt)read_dtaandwrite_dta(.dta)read_arrowandwrite_arrowread_parquetandwrite_parquetread_jsonandwrite_jsonread_rdata(.rdata and .rds)read_gsheetandwrite_gsheet(Google Sheets)read_jsonandwrite_json
Agnostic read and write functions that detect the type and dispatch the appropriate function.
read_fileandwrite_file
list_files to list files in a directory.
Examples
Here is an example of how to write and read a CSV file.
using TidierFiles
df = DataFrame(
integers = [1, 2, 3, 4],
strings = ["This", "Package makes", "File reading/writing", "even smoother"],
floats = [10.2, 20.3, 30.4, 40.5],
dates = [Date(2018,2,20), Date(2018,2,21), Date(2018,2,22), Date(2018,2,23)],
times = [Dates.Time(19,10), Dates.Time(19,20), Dates.Time(19,30), Dates.Time(19,40)]
)
write_csv(df, "testing.csv" , col_names = true)
read_csv("testing.csv", missingstring=["40.5", "10.2"])
4×5 DataFrame
Row │ integers strings floats dates times
│ Int64 String31 Float64? Date Time
─────┼─────────────────────────────────────────────────────────────────
1 │ 1 This missing 2018-02-20 19:10:00
2 │ 2 Package makes 20.3 2018-02-21 19:20:00
3 │ 3 File reading/writing 30.4 2018-02-22 19:30:00
4 │ 4 even smoother missing 2018-02-23 19:40:00:00
The file reading functions include the following keyword arguments:
pathmissing_valuecol_namescol_selectnum_threadsskipn_maxdelim(where applicable)
The path can be a file available either locally or on the web.
read_csv("https://raw.githubusercontent.com/TidierOrg/TidierFiles.jl/main/testing_files/csvtest.csv", skip = 2, n_max = 3, col_select = ["ID", "Score"], missingstring = ["4"])
3×2 DataFrame
Row │ ID Score
│ Int64? Int64
─────┼────────────────
1 │ 3 77
2 │ missing 85
3 │ 5 95
Read multiple files by passing paths as a vector.
path = "https://raw.githubusercontent.com/TidierOrg/TidierFiles.jl/main/testing_files/csvtest.csv"
read_csv([path, path], skip=3)
4×3 DataFrame
Row │ ID Name Score
│ Int64 String7 Int64
─────┼───────────────────────
1 │ 4 David 85
2 │ 5 Eva 95
3 │ 4 David 85
4 │ 5 Eva 95
Related Skills
qqbot-channel
349.9kQQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用。
docs-writer
100.4k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
349.9kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
Design
Campus Second-Hand Trading Platform \- General Design Document (v5.0 \- React Architecture \- Complete Final Version)1\. System Overall Design 1.1. Project Overview This project aims t
