Skip to content

Commit

Permalink
Add comment on default row names
Browse files Browse the repository at this point in the history
  • Loading branch information
trossi committed Jan 22, 2025
1 parent be97c4c commit d755d08
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rdata/conversion/to_r.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ def dataframe_constructor(
if isinstance(index, pd.RangeIndex):
assert isinstance(index.start, int)
if index.start == 1 and index.stop == data.shape[0] + 1 and index.step == 1:
# Construct default row names stored as [R_INT_NA, -len]
row_names = np.ma.array(
data=[R_INT_NA, -data.shape[0]],
mask=[True, False],
Expand Down

0 comments on commit d755d08

Please sign in to comment.