Skip to content

Commit 51f98b0

Browse files
committed
small docstring changes
1 parent bdd25a4 commit 51f98b0

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

src/docstrings.jl

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -721,9 +721,8 @@ This will contain the `client_id` and `client_secret`
721721
- An instance of `GSheetAuth` containing the client ID, client secret, redirect URI, and access token.
722722
723723
# Example
724-
```
725-
connect_gsheet("your_client_id", "your_client_secret")
726-
read_gsheet("file_url_or_id")
724+
```julia
725+
julia> connect_gsheet("your_client_id", "your_client_secret")
727726
```
728727
"""
729728

@@ -733,7 +732,8 @@ const docstring_read_gsheet =
733732
sheet::String="Sheet1",
734733
range::String="",
735734
col_names::Bool=true,
736-
skip::Int=0, n_max::Int=Inf,
735+
skip::Int=0,
736+
n_max::Int=1000,
737737
col_select=nothing,
738738
missing_value::String="")
739739
@@ -750,6 +750,20 @@ Read data from a Google Sheet into a DataFrame.
750750
- `missing_value::String`: Value to represent missing data. Defaults to an empty string.
751751
752752
# Examples
753-
```
753+
```julia
754+
julia> connect_gsheet("your_client_id", "your_client_secret")
755+
756+
julia> public_sheet = "https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit?gid=0#gid=0";
757+
758+
julia> read_gsheet(public_sheet, sheet="Class Data", n_max=5)
759+
5×6 DataFrame
760+
Row │ Student Name Gender Class Level Home State Major Extracurricular Activity
761+
│ String String String String String String
762+
─────┼───────────────────────────────────────────────────────────────────────────────────
763+
1 │ Alexandra Female 4. Senior CA English Drama Club
764+
2 │ Andrew Male 1. Freshman SD Math Lacrosse
765+
3 │ Anna Female 1. Freshman NC English Basketball
766+
4 │ Becky Female 2. Sophomore SD Art Baseball
767+
5 │ Benjamin Male 4. Senior WI English Basketball
754768
```
755769
"""

0 commit comments

Comments
 (0)