Text processing/2: Difference between revisions

Content added Content deleted
(Added 11l)
Line 1,812: Line 1,812:
</pre>
</pre>


=={{header|Mathematica}}==
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<lang Mathematica>data = Import["Readings.txt","TSV"]; Print["duplicated dates: "];
<lang Mathematica>data = Import["Readings.txt","TSV"]; Print["duplicated dates: "];
Select[Tally@data[[;;,1]], #[[2]]>1&][[;;,1]]//Column
Select[Tally@data[[;;,1]], #[[2]]>1&][[;;,1]]//Column
Print["number of good records: ", Count[(Times@@#[[3;;All;;2]])& /@ data, 1],
Print["number of good records: ", Count[(Times@@#[[3;;All;;2]])& /@ data, 1],
" (out of a total of ", Length[data], ")"]</lang>
" (out of a total of ", Length[data], ")"]</lang>
{{out}}

<pre>duplicated dates:
<pre>duplicated dates:
1990-03-25
1990-03-25
Line 1,824: Line 1,824:
1993-03-28
1993-03-28
1995-03-26
1995-03-26

number of good records: 5017 (out of a total of 5471)</pre>
number of good records: 5017 (out of a total of 5471)</pre>