Skip to content

Commit f147d6d

Browse files
Fix XML doc comments for renameCol and renameColsUsing to use proper XML format
Convert Markdown-style doc comments (## Parameters, [category:...]) to proper XML doc comment format (<summary>, <param>, <category>) consistent with the rest of FrameModule.fs. Co-authored-by: Copilot <[email protected]>
1 parent b3d8422 commit f147d6d

1 file changed

Lines changed: 12 additions & 14 deletions

File tree

src/Deedle/FrameModule.fs

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -778,28 +778,26 @@ module Frame =
778778
if Seq.length frame.ColumnKeys <> Seq.length keys then invalidArg "keys" "New keys do not match current column index length"
779779
Frame<_, _>(frame.RowIndex, Index.ofKeys (ReadOnlyCollection.ofSeq keys), frame.Data, frame.IndexBuilder, frame.VectorBuilder)
780780

781+
/// <summary>
781782
/// Rename a single column of the data frame. Returns a new frame; does not mutate the
782-
/// original. If `oldKey` is not found, the frame is returned unchanged.
783-
///
784-
/// ## Parameters
785-
/// - `oldKey` - The current key of the column to rename.
786-
/// - `newKey` - The new key to assign to that column.
787-
/// - `frame` - Source data frame (which is not mutated by the operation).
788-
///
789-
/// [category:Sorting and index manipulation]
783+
/// original. If <c>oldKey</c> is not found, the frame is returned unchanged.
784+
/// </summary>
785+
/// <param name="oldKey">The current key of the column to rename.</param>
786+
/// <param name="newKey">The new key to assign to that column.</param>
787+
/// <param name="frame">Source data frame (which is not mutated by the operation).</param>
788+
/// <category>Sorting and index manipulation</category>
790789
[<CompiledName("RenameColumn")>]
791790
let renameCol oldKey newKey (frame:Frame<'R, 'C>) =
792791
let newKeys = frame.ColumnKeys |> Seq.map (fun k -> if k = oldKey then newKey else k)
793792
Frame<_, _>(frame.RowIndex, Index.ofKeys (ReadOnlyCollection.ofSeq newKeys), frame.Data, frame.IndexBuilder, frame.VectorBuilder)
794793

794+
/// <summary>
795795
/// Rename all columns of the data frame by applying the specified mapping function.
796796
/// Returns a new frame; does not mutate the original.
797-
///
798-
/// ## Parameters
799-
/// - `mapping` - A function that maps each current column key to a new column key.
800-
/// - `frame` - Source data frame (which is not mutated by the operation).
801-
///
802-
/// [category:Sorting and index manipulation]
797+
/// </summary>
798+
/// <param name="mapping">A function that maps each current column key to a new column key.</param>
799+
/// <param name="frame">Source data frame (which is not mutated by the operation).</param>
800+
/// <category>Sorting and index manipulation</category>
803801
[<CompiledName("RenameColumns")>]
804802
let renameColsUsing (mapping:'C -> 'C2) (frame:Frame<'R, 'C>) =
805803
Frame<_, _>(frame.RowIndex, Index.ofKeys (ReadOnlyCollection.map mapping frame.ColumnIndex.Keys), frame.Data, frame.IndexBuilder, frame.VectorBuilder)

0 commit comments

Comments
 (0)