Skip to main content
6 votes
Accepted

Applying a function on several columns of a dataset fails on Missing

The issue The problem is the structural difference between the two cases: ...
Lukas Lang's user avatar
  • 34.7k
6 votes

Fill a sequence containing missing values

Quite ugly, but might inspire someone to come up with a better solution: ...
Lukas Lang's user avatar
  • 34.7k
6 votes

Using ReactionBalance on chemical entities with missing formula

I don't know why "Diazine" is missing its formula, I will update the database and after the next knowledgebase update it should work. It will work just ...
Jason B.'s user avatar
  • 72.3k
5 votes
Accepted

How to accomodate empty data set in ListPlot, ListLinePlot?

setA = {{1, 2}, {3, 6}, {7, 5}}; setB = {}; ListPlot[{setA, setB} /. {} :> {Missing[]}, PlotLegends -> Automatic]
eldo's user avatar
  • 84.8k
5 votes
Accepted

Quickly checking Missing[] is only at the start of a list

This is quite fast: missingOnlyAtStartOfData1[data_] := FreeQ[data[[LengthWhile[data, MissingQ] + 1 ;;]], _Missing]; My first thought was to refactor the OP's ...
Michael E2's user avatar
  • 259k
4 votes

How to Export ragged data to a spreadsheet with missing variables in a way that the Mean calculations in both Mathematica and the Spreadsheet match

How about the following: ...
JimB's user avatar
  • 44k
4 votes

Quickly checking Missing[] is only at the start of a list

This is slightly faster: ...
lericr's user avatar
  • 39.6k
4 votes
Accepted

Fill a sequence containing missing values

Edited according to @eldo's comment: ...
MelaGo's user avatar
  • 9,381
3 votes

Using ReactionBalance on chemical entities with missing formula

You can use ChemicalFormula instead of an entity. ...
Domen's user avatar
  • 41.5k
3 votes
Accepted

Missing["reason"] changes when Joined in a Tabular

For efficiency reasons Tabular stores a single type of Missing[...] internally, which is Missing["NotAvailable"] by default. It is possible to extend the number of different Missing[...] ...
jose's user avatar
  • 6,888
3 votes
Accepted

How to Export ragged data to a spreadsheet with missing variables in a way that the Mean calculations in both Mathematica and the Spreadsheet match

In Mathematica Assume I have a file like below: data1.csv --------- 1,2,3 0,,4 ,,2 If you import the following file, it will replace empty cells with ...
Ben Izd's user avatar
  • 9,669
3 votes
Accepted

Missing["reason"]—can any reason be used?

The documentation states, Missing is "a symbolic object, with no default evaluation rules defined". That means Missing is not a ...
m_goldberg's user avatar
  • 109k
3 votes

How to Export ragged data to a spreadsheet with missing variables in a way that the Mean calculations in both Mathematica and the Spreadsheet match

The gist of your question seems to be how to find an identical representation for your data that is interpreted the same way in both Mathematica and some unidentified spreadsheet application. First ...
lericr's user avatar
  • 39.6k
3 votes

Using TotalVariationFilter on dataset with missing data

This is a workaround in some cases. Imagine data: data = {1, 3, 3, Missing[], 4, 3, 2}; TotalVariationFilter would not work: ...
Vitaliy Kaurov's user avatar
2 votes
Accepted

Using two functions to plot one function

FindRoot evidently is not finding all the values. You can set up your tables before using FindRoot. ...
Bill Watts's user avatar
  • 8,588
2 votes

Handling Missing values flexibly in Query (MissingBehavior problem)

Within the Plus function Missing[...] only acts as if it were zero. Actually, it is taken to be ...
WReach's user avatar
  • 69.8k
2 votes
Accepted

Subtracting Missing[] the old way

You could try something like: Unprotect[Missing]; Missing /: Plus[a_Missing, b__] := Indeterminate Protect[Missing]; Your example: ...
Carl Woll's user avatar
  • 133k
2 votes

Replacing values in a dataset

Look at the DisplayForm of the dataset first, it's not what you think. Here's one way to do it: ...
M.R.'s user avatar
  • 31.9k
2 votes
Accepted

Specifying the position of the bottom element in a matrix when the last few elements are missing

rownum = LengthWhile[m, Length@# == 2 &] 2 m[[rownum, 2]] ...
kglr's user avatar
  • 403k
2 votes

Finding Missing Values in TimeSeries

You may use "ReplaceAll". Here are some examples: To remove the missing entry entirely: ...
Daniel Huber's user avatar
  • 60.9k
2 votes
Accepted

Apply a function to a rectangular subgrid with missing values

mF[f_, rows_, columns_] := MapAt[ ReplaceAll[{m_Missing :> m, x_ :> f[x]}], Tuples[{rows, columns}]] Examples: ...
kglr's user avatar
  • 403k
2 votes

Is any function similar to SpanFromLeft and SpanFromAbove that actually imputes the values?

Searching through the documentation, it seems that only *Grid functions deal with Span* placeholders. You can write your own ...
Domen's user avatar
  • 41.5k
1 vote
Accepted

Generalizing a function to ignore Missing

I think the variation you want to apply is to the functions, not to the data. A function like MovingAverage creates a shorter list just by the semantics of what a ...
lericr's user avatar
  • 39.6k
1 vote

ListPointPlot3D syntax for missing data

Oops, that was easy, just enter an empty list instead of Missing[]: ListPointPlot3D[{{}, {{1, 3, 3}, {2, 4, 4}}}]
Kvothe's user avatar
  • 4,931
1 vote

Show Gaps in Data for ListLinePlot3D

...
azerbajdzan's user avatar
  • 32.8k
1 vote
Accepted

Missing Value in ErrorListPlot

This appears to give the same behavior: ...
Mr.Wizard's user avatar
  • 275k
1 vote

Plotting rescaled time series and temporal data

Your issue is caused by the way Mathematica's Plot function handles missing data. It assumes it to be eg. a potentially noisy dataset where interpolating could lead to false assumptions about the ...
Gladaed's user avatar
  • 1,017

Only top scored, non community-wiki answers of a minimum length are eligible