{ "cells": [ { "cell_type": "code", "execution_count": 37, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import json" ] }, { "cell_type": "code", "execution_count": 41, "metadata": {}, "outputs": [], "source": [ "df = pd.read_csv(\"./liber_777.csv\")" ] }, { "cell_type": "code", "execution_count": 42, "metadata": {}, "outputs": [], "source": [ "df = df.transpose()" ] }, { "cell_type": "code", "execution_count": 43, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
0123456789...25262728293031323334
Category0123456789...252627282930313232 bis31 bis
2 - Hebrew NamesAin (אין) - Ain Soph (אין סוף) - Ain Soph Aur ...(כתר) KetherChokmah ()(בינה) BinahChesed ()(גבורה) GeburahTiphareth ()(נצח) NetzachHod ()(יסוד) Yesod...(סמך) SamekhAyin ()(פה) Pé(צדי) Tzaddi(קוף) Qoph(ריש) Resh(שין) Shin(תו) Tau(תו) Tau(שין) Shin
3 - English of IILimitless LVX - No Limit - NothingCrownWisdomUnderstandingMercyStrengthBeautyVictorySplendourFoundation...PropEyeMouthFish-hookBack of headHeadToothTau (as Egyptian)......
10 - Mystic Numbers of the Sephiroth0136101521283645...325351378406435465496528......
11 - Elements & Rulers...Root of 🜁Root of 🜁Root of 🜁🜄🜂🜁🜂🜄🜁...Sun - 🜂 - JupiterVenus - 🜃 - Moon...Saturn - 🜁 - MercuryMars - 🜄...Hot & Dry 🜂...Cold & Dry 🜃...
\n", "

5 rows × 35 columns

\n", "
" ], "text/plain": [ " 0 \\\n", "Category 0 \n", "2 - Hebrew Names Ain (אין) - Ain Soph (אין סוף) - Ain Soph Aur ... \n", "3 - English of II Limitless LVX - No Limit - Nothing \n", "10 - Mystic Numbers of the Sephiroth 0 \n", "11 - Elements & Rulers ... \n", "\n", " 1 2 \\\n", "Category 1 2 \n", "2 - Hebrew Names (כתר) Kether Chokmah () \n", "3 - English of II Crown Wisdom \n", "10 - Mystic Numbers of the Sephiroth 1 3 \n", "11 - Elements & Rulers Root of 🜁 Root of 🜁 \n", "\n", " 3 4 \\\n", "Category 3 4 \n", "2 - Hebrew Names (בינה) Binah Chesed () \n", "3 - English of II Understanding Mercy \n", "10 - Mystic Numbers of the Sephiroth 6 10 \n", "11 - Elements & Rulers Root of 🜁 🜄 \n", "\n", " 5 6 \\\n", "Category 5 6 \n", "2 - Hebrew Names (גבורה) Geburah Tiphareth () \n", "3 - English of II Strength Beauty \n", "10 - Mystic Numbers of the Sephiroth 15 21 \n", "11 - Elements & Rulers 🜂 🜁 \n", "\n", " 7 8 9 \\\n", "Category 7 8 9 \n", "2 - Hebrew Names (נצח) Netzach Hod () (יסוד) Yesod \n", "3 - English of II Victory Splendour Foundation \n", "10 - Mystic Numbers of the Sephiroth 28 36 45 \n", "11 - Elements & Rulers 🜂 🜄 🜁 \n", "\n", " ... 25 \\\n", "Category ... 25 \n", "2 - Hebrew Names ... (סמך) Samekh \n", "3 - English of II ... Prop \n", "10 - Mystic Numbers of the Sephiroth ... 325 \n", "11 - Elements & Rulers ... Sun - 🜂 - Jupiter \n", "\n", " 26 27 \\\n", "Category 26 27 \n", "2 - Hebrew Names Ayin () (פה) Pé \n", "3 - English of II Eye Mouth \n", "10 - Mystic Numbers of the Sephiroth 351 378 \n", "11 - Elements & Rulers Venus - 🜃 - Moon ... \n", "\n", " 28 29 \\\n", "Category 28 29 \n", "2 - Hebrew Names (צדי) Tzaddi (קוף) Qoph \n", "3 - English of II Fish-hook Back of head \n", "10 - Mystic Numbers of the Sephiroth 406 435 \n", "11 - Elements & Rulers Saturn - 🜁 - Mercury Mars - 🜄 \n", "\n", " 30 31 \\\n", "Category 30 31 \n", "2 - Hebrew Names (ריש) Resh (שין) Shin \n", "3 - English of II Head Tooth \n", "10 - Mystic Numbers of the Sephiroth 465 496 \n", "11 - Elements & Rulers ... Hot & Dry 🜂 \n", "\n", " 32 33 \\\n", "Category 32 32 bis \n", "2 - Hebrew Names (תו) Tau (תו) Tau \n", "3 - English of II Tau (as Egyptian) ... \n", "10 - Mystic Numbers of the Sephiroth 528 ... \n", "11 - Elements & Rulers ... Cold & Dry 🜃 \n", "\n", " 34 \n", "Category 31 bis \n", "2 - Hebrew Names (שין) Shin \n", "3 - English of II ... \n", "10 - Mystic Numbers of the Sephiroth ... \n", "11 - Elements & Rulers ... \n", "\n", "[5 rows x 35 columns]" ] }, "execution_count": 43, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.head()" ] }, { "cell_type": "code", "execution_count": 44, "metadata": {}, "outputs": [], "source": [ "df = df.reset_index()" ] }, { "cell_type": "code", "execution_count": 45, "metadata": {}, "outputs": [], "source": [ "df = df.iloc[1:]" ] }, { "cell_type": "code", "execution_count": 46, "metadata": {}, "outputs": [], "source": [ "json_string = df.to_json(orient='records', force_ascii=False)\n", "o = json.loads(json_string)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [] }, { "cell_type": "code", "execution_count": 47, "metadata": {}, "outputs": [], "source": [ "json_data = json.dumps(o, ensure_ascii=False).encode('utf-8').decode('unicode_escape')\n", "\n", "# Specify the JavaScript file path\n", "js_file_path = '../src/liber_777.js'\n", "\n", "import json\n", "with open(js_file_path, 'w', encoding='utf8') as f:\n", "\tf.write('export const Liber777 = ')\n", "\tjson.dump(o, f, ensure_ascii=False)\n", "\tf.write(';')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "drlnd", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.6" }, "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 }