Skip to content

Commit c8d467d

Browse files
committed
DOC: Fixed outdated doc-string, added missing default values, added missing optional parameters for some io classes (+1 squashed commit)
Squashed commits: [7851d88] DOC: Fixed outdated doc-string, added missing default values, added missing optional parameters for some io classes (+1 squashed commit) Squashed commits: [1a77b43] DOC: Fixed outdated doc-string, added missing default values, added missing optional parameters for some io classes (+1 squashed commit) Squashed commits: [739945e] DOC: Fixed outdated doc-string, added missing default values, added missing optional parameters for some io classes
1 parent da6ad3f commit c8d467d

File tree

3 files changed

+54
-46
lines changed

3 files changed

+54
-46
lines changed

pandas/io/data.py

+23-16
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,17 @@ def DataReader(name, data_source=None, start=None, end=None,
5353
name : str or list of strs
5454
the name of the dataset. Some data sources (yahoo, google, fred) will
5555
accept a list of names.
56-
data_source: str
56+
data_source: str, default: None
5757
the data source ("yahoo", "google", "fred", or "ff")
58-
start : {datetime, None}
58+
start : datetime, default: None
5959
left boundary for range (defaults to 1/1/2010)
60-
end : {datetime, None}
60+
end : datetime, default: None
6161
right boundary for range (defaults to today)
62+
retry_count : int, default 3
63+
Number of times to retry query request.
64+
pause : numeric, default 0.001
65+
Time, in seconds, to pause between consecutive queries of chunks. If
66+
single value given for symbol, represents the pause between retries.
6267
6368
Examples
6469
----------
@@ -398,28 +403,28 @@ def get_data_yahoo(symbols=None, start=None, end=None, retry_count=3,
398403
399404
Parameters
400405
----------
401-
symbols : string, array-like object (list, tuple, Series), or DataFrame
406+
symbols : string, array-like object (list, tuple, Series), or DataFrame, default: None
402407
Single stock symbol (ticker), array-like object of symbols or
403-
DataFrame with index containing stock symbols.
408+
DataFrame with index containing stock symbols
404409
start : string, (defaults to '1/1/2010')
405410
Starting date, timestamp. Parses many different kind of date
406411
representations (e.g., 'JAN-01-2010', '1/1/10', 'Jan, 1, 1980')
407412
end : string, (defaults to today)
408413
Ending date, timestamp. Same format as starting date.
409-
retry_count : int, default 3
414+
retry_count : int, default: 3
410415
Number of times to retry query request.
411-
pause : int, default 0
416+
pause : numeric, default: 0.001
412417
Time, in seconds, to pause between consecutive queries of chunks. If
413418
single value given for symbol, represents the pause between retries.
414-
adjust_price : bool, default False
419+
adjust_price : bool, default: False
415420
If True, adjusts all prices in hist_data ('Open', 'High', 'Low',
416421
'Close') based on 'Adj Close' price. Adds 'Adj_Ratio' column and drops
417422
'Adj Close'.
418-
ret_index : bool, default False
423+
ret_index : bool, default: False
419424
If True, includes a simple return index 'Ret_Index' in hist_data.
420-
chunksize : int, default 25
425+
chunksize : int, default: 25
421426
Number of symbols to download consecutively before intiating pause.
422-
interval : string, default 'd'
427+
interval : string, default: 'd'
423428
Time interval code, valid values are 'd' for daily, 'w' for weekly,
424429
'm' for monthly and 'v' for dividend.
425430
@@ -451,13 +456,15 @@ def get_data_google(symbols=None, start=None, end=None, retry_count=3,
451456
representations (e.g., 'JAN-01-2010', '1/1/10', 'Jan, 1, 1980')
452457
end : string, (defaults to today)
453458
Ending date, timestamp. Same format as starting date.
454-
retry_count : int, default 3
459+
retry_count : int, default: 3
455460
Number of times to retry query request.
456-
pause : int, default 0
461+
pause : numeric, default: 0.001
457462
Time, in seconds, to pause between consecutive queries of chunks. If
458463
single value given for symbol, represents the pause between retries.
459-
chunksize : int, default 25
464+
chunksize : int, default: 25
460465
Number of symbols to download consecutively before intiating pause.
466+
ret_index : bool, default: False
467+
If True, includes a simple return index 'Ret_Index' in hist_data.
461468
462469
Returns
463470
-------
@@ -903,10 +910,10 @@ def get_near_stock_price(self, above_below=2, call=True, put=False,
903910
The number of strike prices above and below the stock price that
904911
should be taken
905912
906-
call : bool
913+
call : bool, default: True
907914
Tells the function whether or not it should be using calls
908915
909-
put : bool
916+
put : bool, default: False
910917
Tells the function weather or not it should be using puts
911918
912919
month : number, int, optional(default=None)

pandas/io/ga.py

+24-25
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@
3030
dimensions : list of str
3131
Un-prefixed dimension variable names
3232
start_date : str/date/datetime
33-
end_date : str/date/datetime, optional
34-
Defaults to today
35-
segment : list of str, optional
36-
filters : list of str, optional
33+
end_date : str/date/datetime, optional, default is None but internally set as today
34+
segment : list of str, optional, default: None
35+
filters : list of str, optional, default: None
3736
start_index : int, default 1
3837
max_results : int, default 10000
3938
If >10000, must specify chunksize or ValueError will be raised"""
@@ -58,21 +57,21 @@
5857
Sort output by index or list of columns
5958
chunksize : int, optional
6059
If max_results >10000, specifies the number of rows per iteration
61-
index_col : str/list of str/dict, optional
60+
index_col : str/list of str/dict, optional, default: None
6261
If unspecified then dimension variables are set as index
63-
parse_dates : bool/list/dict, default True
64-
keep_date_col : boolean, default False
65-
date_parser : optional
66-
na_values : optional
67-
converters : optional
62+
parse_dates : bool/list/dict, default: True
63+
keep_date_col : boolean, default: False
64+
date_parser : optional, default: None
65+
na_values : optional, default: None
66+
converters : optional, default: None
6867
dayfirst : bool, default False
6968
Informs date parsing
70-
account_name : str, optional
71-
account_id : str, optional
72-
property_name : str, optional
73-
property_id : str, optional
74-
profile_name : str, optional
75-
profile_id : str, optional
69+
account_name : str, optional, default: None
70+
account_id : str, optional, default: None
71+
property_name : str, optional, default: None
72+
property_id : str, optional, default: None
73+
profile_name : str, optional, default: None
74+
profile_id : str, optional, default: None
7675
%%(extras)s
7776
Returns
7877
-------
@@ -192,8 +191,8 @@ def get_account(self, name=None, id=None, **kwargs):
192191
193192
Parameters
194193
----------
195-
name : str, optional
196-
id : str, optional
194+
name : str, optional, default: None
195+
id : str, optional, default: None
197196
"""
198197
accounts = self.service.management().accounts().list().execute()
199198
return _get_match(accounts, name, id, **kwargs)
@@ -205,9 +204,9 @@ def get_web_property(self, account_id=None, name=None, id=None, **kwargs):
205204
206205
Parameters
207206
----------
208-
account_id : str, optional
209-
name : str, optional
210-
id : str, optional
207+
account_id : str, optional, default: None
208+
name : str, optional, default: None
209+
id : str, optional, default: None
211210
"""
212211
prop_store = self.service.management().webproperties()
213212
kwds = {}
@@ -225,10 +224,10 @@ def get_profile(self, account_id=None, web_property_id=None, name=None,
225224
226225
Parameters
227226
----------
228-
account_id : str, optional
229-
web_property_id : str, optional
230-
name : str, optional
231-
id : str, optional
227+
account_id : str, optional, default: None
228+
web_property_id : str, optional, default: None
229+
name : str, optional, default: None
230+
id : str, optional, default: None
232231
"""
233232
profile_store = self.service.management().profiles()
234233
kwds = {}

pandas/io/json.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@ def read_json(path_or_buf=None, orient=None, typ='frame', dtype=True,
110110
111111
Parameters
112112
----------
113-
filepath_or_buffer : a valid JSON string or file-like
113+
path_or_buf : a valid JSON string or file-like, default: None
114114
The string could be a URL. Valid URL schemes include http, ftp, s3, and
115115
file. For file URLs, a host is expected. For instance, a local file
116116
could be ``file://localhost/path/to/table.json``
117117
118-
orient
118+
orient
119119
120120
* `Series`
121121
@@ -162,13 +162,13 @@ def read_json(path_or_buf=None, orient=None, typ='frame', dtype=True,
162162
163163
* it is ``'date'``
164164
165-
keep_default_dates : boolean, default True.
165+
keep_default_dates : boolean, default True
166166
If parsing dates, then parse the default datelike columns
167167
numpy : boolean, default False
168168
Direct decoding to numpy arrays. Supports numeric data only, but
169169
non-numeric column and index labels are supported. Note also that the
170170
JSON ordering MUST be the same for each term if numpy=True.
171-
precise_float : boolean, default False.
171+
precise_float : boolean, default False
172172
Set to enable usage of higher precision (strtod) function when
173173
decoding string to double values. Default (False) is to use fast but
174174
less precise builtin functionality
@@ -582,6 +582,8 @@ def nested_to_record(ds, prefix="", level=0):
582582
Parameters
583583
----------
584584
ds : dict or list of dicts
585+
prefix: the prefix, optional, default: ""
586+
level: the number of levels in the jason string, optional, default: 0
585587
586588
Returns
587589
-------
@@ -646,7 +648,7 @@ def json_normalize(data, record_path=None, meta=None,
646648
record_path : string or list of strings, default None
647649
Path in each object to list of records. If not passed, data will be
648650
assumed to be an array of records
649-
meta : list of paths (string or list of strings)
651+
meta : list of paths (string or list of strings), default None
650652
Fields to use as metadata for each record in resulting table
651653
record_prefix : string, default None
652654
If True, prefix records with dotted (?) path, e.g. foo.bar.field if

0 commit comments

Comments
 (0)