Your curve seems to be an outline of quite wide line segments. The parts of the outline are joined in a bizarre way which makes loops. I would go back to source and try to find other exporting options, maybe one with zero line width.
If the data was available as numbers, Illustrator's graph tool could make the wanted curve; only copy and paste or type the coordinates to the input table.
If simpler export curve and redraw from data in Illustrator are both impossible, but you already know what to do, if someone removes the triangles at first, you simply remove the triangles and go on. Removal methods:
- Pathfinder panel "Outline". It splits every curve at every crossing and removes fills and strokes. Ungroup! Give to the splinters some stroke to make them visible, erase the unwanted ones and keep the rest. It's splintered, but you obviously can use it without joining.
Shape Builder. Select your shape. Take the Shape Builder tool. Set no fill color, set some narrow stroke to make the result visible. Drag over the triangles and hold Ctrl, you see how areas get combined to one loopless shape
Erase the triangles with the eraser tool. That deletes the interior and leaves a compound path. Release it (Object > Path > Compound path > Release) and delete the unwanted hole shape. Be sure your outline is a closed shape. Only 1 click is needed with the eraser.
Your linked receipe unfortunately fails if there's nearly vertical parts as a narrow V or A. If the corner is a narrow V, the upper edge (blue) can be far away from the right line(green):
Here is one fully manual method for more accurate work. Remove the fill color and give a reasonable narrow stroke to see your curve properly:
Split your curve with the scissors tool at anchor points. No need to split curves in the middle of them. Delete the curves and the returning sides of the triangles. Here they are only moved aside, but they should be deleted out of the way:
Stretch the line ends with the normal selection tool one by one holding the Shift key at the same time until all lines have a crossing
You need a node at the crossings. You can insert them one by one. As well you can select all and split all at the crossings with Pathfinder panel > Outline. It removes stroke color, but set a new color (green)
The result can be used in a short way by ungrouping and deleting the extras; the upper or the lower half can be good enough in some cases. But it's not the exact mid curve. You can draw it manually. Draw with the line tool line segments between the upper and lower corner points (=red). If you have snap to points ON, they should snap easily:
Select all and goto Object > Path > Add Anchor Points. That gives to all segments the midpoint. Draw the final lines between the midpoints:
You can delete the extras fast by selecting all with the same stroke color. Give to the final lines round caps or join them.