Questions tagged [deedle]

Deedle is an easy to use library for data and time series manipulation. It supports working with data frames, ordered and unordered data, as well as time series. Deedle works well for exploratory programming using F#, but can be also used in efficient compiled .NET code.

Deedle is an easy to use library for data and time series manipulation and for scientific programming. It supports working with structured data frames, ordered and unordered data, as well as time series. Deedle is designed to work well for exploratory programming using F# and C# interactive console, but can be also used in efficient compiled .NET code.

The library implements a wide range of operations for data manipulation including advanced indexing and slicing, joining and aligning data, handling of missing values, grouping and aggregation, statistics and more.

For more information see:

The following tutorial is a good starting point:

274 questions
3
votes
1 answer

C# - Convert R Data Frame to Deedle.Frame

I have a C# application which needs a Deedle Frame as input data. I also have a R script that return a data frame, and I don't want to re-implement the algorithm in R script by C#. I tried using R.Net, I can get the data frame from R script in C#…
Ha Pham
  • 373
  • 3
  • 18
3
votes
0 answers

GroupBy in Deedle

I want to group my dataframe by certain columns and then iterate over the groups like I can easily do using the LINQ .GroupBy(). var groupedByTags = dataFrame.GroupRowsUsing((i, series) => GetTags(series)); // GetTags extracts my groupKey does do…
roederja
  • 31
  • 2
3
votes
1 answer

Copy deedle frame to excel

My goal is to efficiently copy a deedle frame to excel in F#. I have never worked with excel from F#. I have been inspired by this tutorial. This is my code: #r "Microsoft.Office.Interop.Excel" open Microsoft.Office.Interop.Excel /// Export data…
NoIdeaHowToFixThis
  • 4,484
  • 2
  • 34
  • 69
3
votes
1 answer

Plotting Deedle frame

I have the following piece of code: let mychart = frame.GetAllSeries() |> Seq.iter(fun key value -> Chart.Line(value, Name=key) |> Chart.Combine where frame.GetAllSeries() returns a seq. I'd like to pipe the sequence directly in a…
NoIdeaHowToFixThis
  • 4,484
  • 2
  • 34
  • 69
2
votes
2 answers

Deedle - Distinct by column

I had a situation the other day where a particular column of my Frame had some duplicate values. I wanted to remove any rows where said column had a duplicate value. I managed to hack a solution using a filter function, and while it was good enough…
OrdinaryOrange
  • 2,420
  • 1
  • 16
  • 25
2
votes
2 answers

Deedle in dotnet interactive

Context If I enter the following: #r "nuget:Deedle" #r "nuget:FSharp.Charting" open System open Deedle open FSharp.Charting let dates = [ DateTime(2013, 1, 1); DateTime(2013, 1, 4); DateTime(2013, 1, 8); ] let values = [ 10.0; 20.0;…
dharmatech
  • 8,979
  • 8
  • 42
  • 88
2
votes
1 answer

Cross join with Deedle

I'm trying to learn some F# and Deedle by analyzing my electricity costs. Suppose I have two frames, one containing my electricity usage: let consumptionsByYear = [ (2019, "Total", 500); (2019, "Day", 200); (2019, "Night", 300); (2020,…
Jani
  • 1,088
  • 1
  • 10
  • 18
2
votes
0 answers

Comparing F#'s list handling to python's pandas vectorization

How does F#'s list handling in Deedle and List.fold compare to vectorized handling of pandas dataframes in python performance-wise? What are the mechanical differences under the hood? I understand Python's pandas's performance gain using vectorized…
harmonica141
  • 1,389
  • 2
  • 23
  • 27
2
votes
1 answer

How can I use Deedle to get every row from some key and below?

I want to return every value up to and including some key. Whilst I could generate every such key and chuck them all into the Get, I suspect this will inefficiently search for the value of every key. Inspired by this answer, I have come up with the…
Chechy Levas
  • 2,206
  • 1
  • 13
  • 28
2
votes
1 answer

C# Deedle Dataframe compare columns to create new resulting column

Someone put me out of my misery please! I can't see the forest for all those trees. I have a populated Deedle frame which is effectively of type: Frame MyPopulatedFrame I won't bore you with the initial population routine, but it prints…
Retcorp
  • 23
  • 2
2
votes
1 answer

Deedle - what is most efficient (fastest) way to replace an item in a column based on value of another item in another column on the same row

I have this data frame AutoStat_1 AutoStat_2 Mode_1 Mode_2 Setpoint_1 Setpoint_2 0 -> 0 0 1 1 23 24 1 -> 0 1 1 0 23 27 2 -> 1 1 3 0 26 …
Jose Vu
  • 621
  • 5
  • 13
2
votes
2 answers

Finding the Stats.max for each hierarchical index in Deedle

If I have a dataset that contains [City, Dealership, Total Cars Sold]. How would I get the top dealer in each city and the number of cars they sold? The results should look like City1 Dealership A 2000 City2 Dealership X 1000 etc. I'm sure it's…
Stringer Bell
  • 265
  • 1
  • 4
  • 13
2
votes
1 answer

How to forward fill missing values in a C# data frame

I am trying to forward fill values in a Deedle C# data frame, like the equivalent of using the pandas.ffill() function in python. The forward fill in pandas, allows for forward filling at both row and column indexes. I want do the same in Deedle, to…
2
votes
2 answers

F# - Write Deedle FrameData To CSV

I need to write a Deedle FrameData (including "ID" column and additional "Delta" column with blank entries) to CSV. While I can generate a 2D array of the FrameData, I am unable to write it correctly to a CSV file. module SOQN = open System …
matekus
  • 778
  • 3
  • 14
2
votes
2 answers

How to update all values in a Deedle frame?

I want to replace all values in a deedle Frame / Series; Example, I want to replace all -1 by 0. I could not find a way to do it. in F#, there seem to be a mapValue function, but can't find equivalent in C#
bmigette
  • 59
  • 1
  • 12