|
66 | 66 | }, |
67 | 67 | { |
68 | 68 | "cell_type": "code", |
69 | | - "execution_count": 4, |
| 69 | + "execution_count": 2, |
70 | 70 | "metadata": {}, |
71 | 71 | "outputs": [], |
72 | 72 | "source": [ |
73 | 73 | "import refinitiv.data as rd\n", |
74 | | - "from refinitiv.data.content.ipa import surfaces" |
| 74 | + "from refinitiv.data.content.ipa import surfaces\n", |
| 75 | + "from refinitiv.data.content.ipa._enums import Axis" |
75 | 76 | ] |
76 | 77 | }, |
77 | 78 | { |
|
85 | 86 | }, |
86 | 87 | { |
87 | 88 | "cell_type": "code", |
88 | | - "execution_count": 5, |
| 89 | + "execution_count": 3, |
89 | 90 | "metadata": {}, |
90 | 91 | "outputs": [ |
91 | 92 | { |
|
94 | 95 | "<refinitiv.data.session.Definition object at 0x7fb2aeb727f0 {name='workspace'}>" |
95 | 96 | ] |
96 | 97 | }, |
97 | | - "execution_count": 5, |
| 98 | + "execution_count": 4, |
98 | 99 | "metadata": {}, |
99 | 100 | "output_type": "execute_result" |
100 | 101 | } |
|
112 | 113 | }, |
113 | 114 | { |
114 | 115 | "cell_type": "code", |
115 | | - "execution_count": 7, |
| 116 | + "execution_count": 5, |
116 | 117 | "metadata": {}, |
117 | 118 | "outputs": [ |
118 | 119 | { |
|
487 | 488 | "1.193120 9.238913 9.620762 10.056783 " |
488 | 489 | ] |
489 | 490 | }, |
490 | | - "execution_count": 7, |
| 491 | + "execution_count": 6, |
491 | 492 | "metadata": {}, |
492 | 493 | "output_type": "execute_result" |
493 | 494 | } |
|
513 | 514 | }, |
514 | 515 | { |
515 | 516 | "cell_type": "code", |
516 | | - "execution_count": 8, |
| 517 | + "execution_count": 7, |
517 | 518 | "metadata": {}, |
518 | 519 | "outputs": [ |
519 | 520 | { |
520 | | - "data": { |
521 | | - "text/plain": [ |
522 | | - "<refinitiv.data.content.ipa._curves._models._curve.Curve at 0x7fb2aed24970>" |
523 | | - ] |
524 | | - }, |
525 | | - "metadata": {}, |
526 | | - "output_type": "display_data" |
| 521 | + "name": "stdout", |
| 522 | + "output_type": "stream", |
| 523 | + "text": [ |
| 524 | + "curve.x: [1.10383664 1.10941686 1.11499709 1.12057732 1.12615755 1.13173777\n", |
| 525 | + " 1.137318 1.14289823 1.14847846 1.15405868 1.15963891 1.16521914\n", |
| 526 | + " 1.17079937 1.17637959 1.18195982 1.18754005 1.19312027]\n", |
| 527 | + "curve.y: [10.39183978 10.36920782 10.34678789 10.32458262 10.30259475 10.28082708\n", |
| 528 | + " 10.25928247 10.23796387 10.21687428 10.19601678 10.17539451 10.15501066\n", |
| 529 | + " 10.13486849 10.1149713 10.09532244 10.07592531 10.05678332]\n" |
| 530 | + ] |
527 | 531 | } |
528 | 532 | ], |
529 | 533 | "source": [ |
530 | 534 | "surface = response.data.surface\n", |
531 | | - "curve = surface.get_curve(\"2018-15-10\", \"X\")\n", |
532 | | - "display(curve)" |
| 535 | + "curve = surface.get_curve(\"2018-15-10\", Axis.X)\n", |
| 536 | + "print(\"curve.x: \", curve.x)\n", |
| 537 | + "print(\"curve.y: \", curve.y)" |
533 | 538 | ] |
534 | 539 | }, |
535 | 540 | { |
536 | 541 | "cell_type": "code", |
537 | | - "execution_count": 9, |
| 542 | + "execution_count": 8, |
538 | 543 | "metadata": {}, |
539 | 544 | "outputs": [ |
540 | 545 | { |
541 | | - "data": { |
542 | | - "text/plain": [ |
543 | | - "SurfacePoint(x=1.5395616e+18, y=38.25, z=10.056783324290427)" |
544 | | - ] |
545 | | - }, |
546 | | - "metadata": {}, |
547 | | - "output_type": "display_data" |
| 546 | + "name": "stdout", |
| 547 | + "output_type": "stream", |
| 548 | + "text": [ |
| 549 | + "x: 1.5395616e+18 y: 38.25\n" |
| 550 | + ] |
548 | 551 | } |
549 | 552 | ], |
550 | 553 | "source": [ |
551 | 554 | "surface = response.data.surface\n", |
552 | 555 | "point = surface.get_point(\"2018-15-10\", 38.25)\n", |
553 | | - "display(point)" |
| 556 | + "print(\"x:\", point.x, \"y:\", point.y)" |
554 | 557 | ] |
555 | 558 | }, |
556 | 559 | { |
|
562 | 565 | }, |
563 | 566 | { |
564 | 567 | "cell_type": "code", |
565 | | - "execution_count": 10, |
| 568 | + "execution_count": 9, |
566 | 569 | "metadata": { |
567 | 570 | "pycharm": { |
568 | 571 | "name": "#%%\n" |
|
0 commit comments