diff --git a/pandas/io/data.py b/pandas/io/data.py index 1a4c45628a256..310b165101bdf 100644 --- a/pandas/io/data.py +++ b/pandas/io/data.py @@ -53,12 +53,17 @@ def DataReader(name, data_source=None, start=None, end=None, name : str or list of strs the name of the dataset. Some data sources (yahoo, google, fred) will accept a list of names. - data_source: str + data_source: str, default: None the data source ("yahoo", "google", "fred", or "ff") - start : {datetime, None} + start : datetime, default: None left boundary for range (defaults to 1/1/2010) - end : {datetime, None} + end : datetime, default: None right boundary for range (defaults to today) + retry_count : int, default 3 + Number of times to retry query request. + pause : numeric, default 0.001 + Time, in seconds, to pause between consecutive queries of chunks. If + single value given for symbol, represents the pause between retries. Examples ---------- @@ -398,28 +403,28 @@ def get_data_yahoo(symbols=None, start=None, end=None, retry_count=3, Parameters ---------- - symbols : string, array-like object (list, tuple, Series), or DataFrame + symbols : string, array-like object (list, tuple, Series), or DataFrame, default: None Single stock symbol (ticker), array-like object of symbols or - DataFrame with index containing stock symbols. + DataFrame with index containing stock symbols start : string, (defaults to '1/1/2010') Starting date, timestamp. Parses many different kind of date representations (e.g., 'JAN-01-2010', '1/1/10', 'Jan, 1, 1980') end : string, (defaults to today) Ending date, timestamp. Same format as starting date. - retry_count : int, default 3 + retry_count : int, default: 3 Number of times to retry query request. - pause : int, default 0 + pause : numeric, default: 0.001 Time, in seconds, to pause between consecutive queries of chunks. If single value given for symbol, represents the pause between retries. - adjust_price : bool, default False + adjust_price : bool, default: False If True, adjusts all prices in hist_data ('Open', 'High', 'Low', 'Close') based on 'Adj Close' price. Adds 'Adj_Ratio' column and drops 'Adj Close'. - ret_index : bool, default False + ret_index : bool, default: False If True, includes a simple return index 'Ret_Index' in hist_data. - chunksize : int, default 25 + chunksize : int, default: 25 Number of symbols to download consecutively before intiating pause. - interval : string, default 'd' + interval : string, default: 'd' Time interval code, valid values are 'd' for daily, 'w' for weekly, 'm' for monthly and 'v' for dividend. @@ -451,13 +456,15 @@ def get_data_google(symbols=None, start=None, end=None, retry_count=3, representations (e.g., 'JAN-01-2010', '1/1/10', 'Jan, 1, 1980') end : string, (defaults to today) Ending date, timestamp. Same format as starting date. - retry_count : int, default 3 + retry_count : int, default: 3 Number of times to retry query request. - pause : int, default 0 + pause : numeric, default: 0.001 Time, in seconds, to pause between consecutive queries of chunks. If single value given for symbol, represents the pause between retries. - chunksize : int, default 25 + chunksize : int, default: 25 Number of symbols to download consecutively before intiating pause. + ret_index : bool, default: False + If True, includes a simple return index 'Ret_Index' in hist_data. Returns ------- @@ -903,10 +910,10 @@ def get_near_stock_price(self, above_below=2, call=True, put=False, The number of strike prices above and below the stock price that should be taken - call : bool + call : bool, default: True Tells the function whether or not it should be using calls - put : bool + put : bool, default: False Tells the function weather or not it should be using puts month : number, int, optional(default=None) diff --git a/pandas/io/ga.py b/pandas/io/ga.py index 57de5c6f5abb4..b6b4081e3650f 100644 --- a/pandas/io/ga.py +++ b/pandas/io/ga.py @@ -30,10 +30,9 @@ dimensions : list of str Un-prefixed dimension variable names start_date : str/date/datetime -end_date : str/date/datetime, optional - Defaults to today -segment : list of str, optional -filters : list of str, optional +end_date : str/date/datetime, optional, default is None but internally set as today +segment : list of str, optional, default: None +filters : list of str, optional, default: None start_index : int, default 1 max_results : int, default 10000 If >10000, must specify chunksize or ValueError will be raised""" @@ -58,21 +57,21 @@ Sort output by index or list of columns chunksize : int, optional If max_results >10000, specifies the number of rows per iteration -index_col : str/list of str/dict, optional +index_col : str/list of str/dict, optional, default: None If unspecified then dimension variables are set as index -parse_dates : bool/list/dict, default True -keep_date_col : boolean, default False -date_parser : optional -na_values : optional -converters : optional +parse_dates : bool/list/dict, default: True +keep_date_col : boolean, default: False +date_parser : optional, default: None +na_values : optional, default: None +converters : optional, default: None dayfirst : bool, default False Informs date parsing -account_name : str, optional -account_id : str, optional -property_name : str, optional -property_id : str, optional -profile_name : str, optional -profile_id : str, optional +account_name : str, optional, default: None +account_id : str, optional, default: None +property_name : str, optional, default: None +property_id : str, optional, default: None +profile_name : str, optional, default: None +profile_id : str, optional, default: None %%(extras)s Returns ------- @@ -192,8 +191,8 @@ def get_account(self, name=None, id=None, **kwargs): Parameters ---------- - name : str, optional - id : str, optional + name : str, optional, default: None + id : str, optional, default: None """ accounts = self.service.management().accounts().list().execute() return _get_match(accounts, name, id, **kwargs) @@ -205,9 +204,9 @@ def get_web_property(self, account_id=None, name=None, id=None, **kwargs): Parameters ---------- - account_id : str, optional - name : str, optional - id : str, optional + account_id : str, optional, default: None + name : str, optional, default: None + id : str, optional, default: None """ prop_store = self.service.management().webproperties() kwds = {} @@ -225,10 +224,10 @@ def get_profile(self, account_id=None, web_property_id=None, name=None, Parameters ---------- - account_id : str, optional - web_property_id : str, optional - name : str, optional - id : str, optional + account_id : str, optional, default: None + web_property_id : str, optional, default: None + name : str, optional, default: None + id : str, optional, default: None """ profile_store = self.service.management().profiles() kwds = {} diff --git a/pandas/io/json.py b/pandas/io/json.py index d6310d81ab87f..f368f0e6cf28e 100644 --- a/pandas/io/json.py +++ b/pandas/io/json.py @@ -110,12 +110,12 @@ def read_json(path_or_buf=None, orient=None, typ='frame', dtype=True, Parameters ---------- - filepath_or_buffer : a valid JSON string or file-like + path_or_buf : a valid JSON string or file-like, default: None The string could be a URL. Valid URL schemes include http, ftp, s3, and file. For file URLs, a host is expected. For instance, a local file could be ``file://localhost/path/to/table.json`` - orient + orient * `Series` @@ -162,13 +162,13 @@ def read_json(path_or_buf=None, orient=None, typ='frame', dtype=True, * it is ``'date'`` - keep_default_dates : boolean, default True. + keep_default_dates : boolean, default True If parsing dates, then parse the default datelike columns numpy : boolean, default False Direct decoding to numpy arrays. Supports numeric data only, but non-numeric column and index labels are supported. Note also that the JSON ordering MUST be the same for each term if numpy=True. - precise_float : boolean, default False. + precise_float : boolean, default False Set to enable usage of higher precision (strtod) function when decoding string to double values. Default (False) is to use fast but less precise builtin functionality @@ -582,6 +582,8 @@ def nested_to_record(ds, prefix="", level=0): Parameters ---------- ds : dict or list of dicts + prefix: the prefix, optional, default: "" + level: the number of levels in the jason string, optional, default: 0 Returns ------- @@ -646,7 +648,7 @@ def json_normalize(data, record_path=None, meta=None, record_path : string or list of strings, default None Path in each object to list of records. If not passed, data will be assumed to be an array of records - meta : list of paths (string or list of strings) + meta : list of paths (string or list of strings), default None Fields to use as metadata for each record in resulting table record_prefix : string, default None If True, prefix records with dotted (?) path, e.g. foo.bar.field if