Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test ci #48

Closed
wants to merge 23 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ef8c48d
renamed a few test files.
brettwebst Apr 6, 2024
e4b1bfb
Merge pull request #2 from brettwebst/issue-32-add-dropna-test
brettwebst Apr 6, 2024
507e601
Merge branch 'SciSharp:master' into master
brettwebst Apr 6, 2024
c99194b
Merge branch 'SciSharp:master' into master
brettwebst Apr 6, 2024
8f7fd19
indexer tests
brettwebst Apr 14, 2024
f156da8
Merge pull request #3 from brettwebst/issue-32-add-index-test
brettwebst Apr 14, 2024
8f7890e
Merge branch 'SciSharp:master' into master
brettwebst Apr 27, 2024
4180a8c
subtraction
brettwebst Apr 27, 2024
671dc47
Subtract, divide, and equals
brettwebst Jul 14, 2024
47539a6
DataFrame operators - equality
brettwebst Jul 21, 2024
2b7a6cc
Merge pull request #4 from brettwebst/issue-32-operator-test-2
brettwebst Jul 21, 2024
a81e505
added pop test
brettwebst Jul 27, 2024
345a42c
Merge pull request #5 from brettwebst/issue-32-pop-test
brettwebst Jul 27, 2024
3550ff8
Sample test added.
brettwebst Jul 27, 2024
e5fd6fc
Merge pull request #6 from brettwebst/issue-32-sample
brettwebst Jul 27, 2024
2aca3ab
Create ubuntu-dotnet.yml
brettwebst Jul 27, 2024
fd2e0df
Merge pull request #7 from brettwebst/brettwebst-patch-1
brettwebst Jul 27, 2024
0b014a5
Update ubuntu-dotnet.yml
brettwebst Jul 27, 2024
5bc0a74
Remove reference to TensorFlow.NET
brettwebst Jul 27, 2024
5a4ab95
Update PandasConsole.indexers.cs
brettwebst Jul 27, 2024
239d97b
Merge pull request #9 from brettwebst/brettwebst-patch-1
brettwebst Jul 27, 2024
1068652
ubuntu, windows, and macos ci
brettwebst Jul 27, 2024
1bb1df4
fixing macos file 1
brettwebst Jul 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
renamed a few test files.
tested the dropna function
  • Loading branch information
brettwebst committed Apr 6, 2024
commit ef8c48d4ab395c19c2f92aa6a7d88f82a743ded7
8 changes: 2 additions & 6 deletions src/Pandas.NET/DataFrames/DataFrame.Index.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
using System.Text;
using Tensorflow;
@@ -19,11 +20,6 @@ public DataFrame this[Slice slice]
{
return _data.FirstOrDefault(x => x.name == columName);
}

set
{
throw new NotImplementedException("");
}
}

public Series this[string columName]
@@ -86,7 +82,7 @@ DataFrame Slice(Slice slice)
index.SetValue(_index.GetValue(row), data1RowIndex);
data1RowIndex++;
}

foreach (var d in data1)
d.SetIndex(index);

Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Linq;
using Tensorflow;
using Xunit;
using static PandasNet.PandasApi;

30 changes: 30 additions & 0 deletions test/Pandas.NET.Test/DataFrames/DataFrame.test.dropna.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using System;
using PandasNet;
using Xunit;
using static PandasNet.PandasApi;

namespace Pandas.Test
{
public class DataFrameDropnaTest
{
[Fact]
public void TestDropna()
{
// Arrange
var df = pd.DataFrame.from_dict("{'col_1': [3, 2, 1, 0], 'col_2': ['a', 'b', 'c', 'd']}");
Assert.Equal(4, df.shape[0]);
Assert.Equal(2, df.shape[1]);
df["col_1"].SetNull(1);
df["col_2"].SetNull(2);

// Act
var result = df.dropna();

// Assert
Assert.Equal(2, result.shape[0]); //rows
Assert.Equal(2, result.shape[1]); //columns
Assert.Equal(new int[] { 3, 0 }, result["col_1"].array<int>());
Assert.Equal(new string[] { "a", "d" }, result["col_2"].array<string>());
}
}
}