@@ -175,27 +175,34 @@ def __init__(self):
175
175
176
176
@property
177
177
def credentials (self ):
178
- """google.auth.credentials.Credentials: Credentials to use for Google
179
- APIs.
180
-
181
- Note:
182
- These credentials are automatically cached in memory by calls to
183
- :func:`pandas_gbq.read_gbq` and :func:`pandas_gbq.to_gbq`. To
184
- manually set the credentials, construct an
185
- :class:`google.auth.credentials.Credentials` object and set it as
186
- the context credentials as demonstrated in the example below. See
187
- `auth docs`_ for more information on obtaining credentials.
188
-
189
- Example:
190
- Manually setting the context credentials:
191
- >>> import pandas_gbq
192
- >>> from google.oauth2 import service_account
193
- >>> credentials = (service_account
194
- ... .Credentials.from_service_account_file(
195
- ... '/path/to/key.json'))
196
- >>> pandas_gbq.context.credentials = credentials
178
+ """
179
+ Credentials to use for Google APIs.
180
+
181
+ These credentials are automatically cached in memory by calls to
182
+ :func:`pandas_gbq.read_gbq` and :func:`pandas_gbq.to_gbq`. To
183
+ manually set the credentials, construct an
184
+ :class:`google.auth.credentials.Credentials` object and set it as
185
+ the context credentials as demonstrated in the example below. See
186
+ `auth docs`_ for more information on obtaining credentials.
187
+
197
188
.. _auth docs: http://google-auth.readthedocs.io
198
189
/en/latest/user-guide.html#obtaining-credentials
190
+
191
+ Returns
192
+ -------
193
+ google.auth.credentials.Credentials
194
+
195
+ Examples
196
+ --------
197
+
198
+ Manually setting the context credentials:
199
+
200
+ >>> import pandas_gbq
201
+ >>> from google.oauth2 import service_account
202
+ >>> credentials = service_account.Credentials.from_service_account_file(
203
+ ... '/path/to/key.json',
204
+ ... )
205
+ >>> pandas_gbq.context.credentials = credentials
199
206
"""
200
207
return self ._credentials
201
208
@@ -205,12 +212,19 @@ def credentials(self, value):
205
212
206
213
@property
207
214
def project (self ):
208
- """str: Default project to use for calls to Google APIs.
215
+ """Default project to use for calls to Google APIs.
209
216
210
- Example:
211
- Manually setting the context project:
212
- >>> import pandas_gbq
213
- >>> pandas_gbq.context.project = 'my-project'
217
+ Returns
218
+ -------
219
+ str
220
+
221
+ Examples
222
+ --------
223
+
224
+ Manually setting the context project:
225
+
226
+ >>> import pandas_gbq
227
+ >>> pandas_gbq.context.project = 'my-project'
214
228
"""
215
229
return self ._project
216
230
@@ -220,7 +234,8 @@ def project(self, value):
220
234
221
235
@property
222
236
def dialect (self ):
223
- """str: Default dialect to use in :func:`pandas_gbq.read_gbq`.
237
+ """
238
+ Default dialect to use in :func:`pandas_gbq.read_gbq`.
224
239
225
240
Allowed values for the BigQuery SQL syntax dialect:
226
241
@@ -233,6 +248,18 @@ def dialect(self):
233
248
compliant with the SQL 2011 standard. For more information
234
249
see `BigQuery Standard SQL Reference
235
250
<https://cloud.google.com/bigquery/docs/reference/standard-sql/>`__.
251
+
252
+ Returns
253
+ -------
254
+ str
255
+
256
+ Examples
257
+ --------
258
+
259
+ Setting the default syntax to standard:
260
+
261
+ >>> import pandas_gbq
262
+ >>> pandas_gbq.context.dialect = 'standard'
236
263
"""
237
264
return self ._dialect
238
265
0 commit comments