Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

Commit ac8667f

Browse files
authored
Revert "Doc for df getitem (#665)" (#707)
This reverts commit 751c037.
1 parent 751c037 commit ac8667f

10 files changed

Lines changed: 4 additions & 402 deletions

File tree

docs/source/_templates/_api_ref.pandas.dataframe_templ.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ Attributes/Operators
3131
DataFrame.shape
3232
DataFrame.memory_usage
3333
DataFrame.empty
34-
DataFrame.getitem
3534
3635
Type Conversions
3736
----------------

docs/source/buildscripts/apiref_generator.py

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -422,16 +422,6 @@ def generate_simple_object_doc(pandas_name, short_doc_flag=False, doc_from_panda
422422
if pandas_obj is None:
423423
return doc # Empty documentation for no-object
424424

425-
# Here if additional sections from Intel SDC object needs to be added to pandas_obj docstring
426-
sdc_obj = get_sdc_object_by_pandas_name(pandas_name)
427-
428-
if pandas_obj == 0:
429-
# there is no Pandas documentation, documentation is fully generated from SDC docstring
430-
doc_from_pandas_flag = False
431-
if short_doc_flag:
432-
doc = get_short_description(sdc_obj, sdc_header_flag=True)
433-
return reformat(doc)
434-
435425
if doc_from_pandas_flag: # Check if documentation needs to be generated from Pandas docstring
436426
if short_doc_flag: # Check if only short description is needed
437427
doc = get_short_description(pandas_obj) # Short description is requested
@@ -469,6 +459,8 @@ def generate_simple_object_doc(pandas_name, short_doc_flag=False, doc_from_panda
469459
else:
470460
return doc
471461

462+
# Here if additional sections from Intel SDC object needs to be added to pandas_obj docstring
463+
sdc_obj = get_sdc_object_by_pandas_name(pandas_name)
472464
if sdc_obj is None:
473465
if unsupported_warning:
474466
if reformat_pandas:
@@ -499,10 +491,7 @@ def generate_simple_object_doc(pandas_name, short_doc_flag=False, doc_from_panda
499491
indent = get_indent(doc)
500492
for title, text in sdc_doc:
501493
if title.strip() == '':
502-
if pandas_obj == 0:
503-
doc += reindent(text, indent) + '\n'
504-
else:
505-
doc += '\n' + reindent(text, indent)
494+
doc += '\n' + reindent(text, indent)
506495
else:
507496
doc += '\n' + reindent(create_heading_str(title), indent) + '\n' + \
508497
reindent(text, indent) + '\n'

docs/source/buildscripts/sdc_object_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def get_obj(obj_name):
176176

177177
split_name.pop(0)
178178
for name in split_name:
179-
split_obj = getattr(split_obj, name, 0)
179+
split_obj = getattr(split_obj, name)
180180

181181
return split_obj
182182

examples/dataframe/df_getitem/df_getitem.py

Lines changed: 0 additions & 50 deletions
This file was deleted.

examples/dataframe/df_getitem/df_getitem_array.py

Lines changed: 0 additions & 49 deletions
This file was deleted.

examples/dataframe/df_getitem/df_getitem_attr.py

Lines changed: 0 additions & 50 deletions
This file was deleted.

examples/dataframe/df_getitem/df_getitem_series.py

Lines changed: 0 additions & 48 deletions
This file was deleted.

examples/dataframe/df_getitem/df_getitem_slice.py

Lines changed: 0 additions & 47 deletions
This file was deleted.

examples/dataframe/df_getitem/df_getitem_tuple.py

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)