{"id":60925,"date":"2024-03-29T13:00:50","date_gmt":"2024-03-29T13:00:50","guid":{"rendered":"https:\/\/www.askpython.com\/?p=60925"},"modified":"2025-04-10T20:34:12","modified_gmt":"2025-04-10T20:34:12","slug":"pycaret","status":"publish","type":"post","link":"https:\/\/www.askpython.com\/python-modules\/pycaret","title":{"rendered":"Machine Learning Workflows with Pycaret in Python"},"content":{"rendered":"\n<p>Machine Learning is a diverse field growing continuously with applications spread across many domains like agriculture, finance, marketing, and many more. To utilize machine learning in any domain, we need first to build a model suitable for the use case. Be it classification, regression, or anomaly detection.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.askpython.com\/python\/regression-vs-classification\" data-type=\"post\" data-id=\"19534\">Refer to this article on regression vs classification<\/a><\/p>\n\n\n\n<p>However, building a machine learning model is not an easy task. We need to pre-process the data, write code to build the model, take care of the hyperparameters, evaluate, and finally deploy. What if you can automate all these tasks? Pycaret comes in handy in such situations.<\/p>\n\n\n\n<p>Pycaret is a low-code library used for streamlining machine-learning workflow. In this tutorial, we are going to talk about the important features of this API.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What is Pycaret?<\/strong><\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><em>Pycaret is a low-code machine learning library that automates the ML workflow, making the process seamless and productive. It can reduce hundreds of lines of code to just a few, and can be easily integrated with BI platforms like Power BI and Tableau for creating interactive dashboards<\/em><\/p>\n<\/blockquote>\n\n\n\n<p>It is inspired by the caret machine learning package of R. It can also be integrated easily with Power BI, Tableau, and other BI platforms to make interactive dashboards. <\/p>\n\n\n\n<p>Pycaret can be installed using this command.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\npip install pycaret\n<\/pre><\/div>\n\n\n<p>However, using this command will not install all the optional dependencies. You need to use the command below to install pycaret with all the extra dependencies.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n# install full version\npip install pycaret&#x5B;full]\n<\/pre><\/div>\n\n\n<p>Pycaret doesn&#8217;t just build a model; it aids us in understanding the intricacies of the model, how well it adapts to the data, the best model for the particular dataset, and so on.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Key Functions in Pycaret<\/strong><\/h2>\n\n\n\n<p>Before we move to model building, we need to understand how model building in pycaret works. A set of functions helps us build, evaluate, and tune a model. Here is the list.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Setup <\/strong><\/h3>\n\n\n\n<p>Setup is the most important and primary function of pycaret. It prepares the pipeline for the model and should be executed before any other function. It takes two mandatory parameters &#8211; data, and target. We need to pass the data we need to use and the target column to this function. All other parameters can be ignored.<\/p>\n\n\n\n<p>Follow the example below.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfrom pycaret.classification import *\nclf1 = setup(data = diabetes, target = &#039;Class variable&#039;, session_id = 123)\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\"><strong>2. Compare Models<\/strong><\/h3>\n\n\n\n<p>After we finish setting up the data, it is time to train the model. But, we don&#8217;t need to write the code for training the model conventionally as pycaret has a function called compare models which gives us a list of models suitable for our dataset and highlights the best model using certain performance metrics for classification and regression. <\/p>\n\n\n\n<p><a href=\"https:\/\/www.askpython.com\/python\/examples\/select-machine-learning-features\"><em>Related:<\/em> Select the best ML model features with python<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. Create Model<\/strong><\/h3>\n\n\n\n<p>Once we get our best-performing model from the above function, we can use the <code>create_model<\/code> function to initialize the model for further use. <\/p>\n\n\n\n<p>If the best model is Logistic Regression(lr), then we can create the model as follows:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ncreate_model(&#039;lr&#039;)\n<\/pre><\/div>\n\n\n<p>You have created a model, now what? It is time to optimize the results!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. Tune Model<\/strong><\/h3>\n\n\n\n<p>This function essentially tweaks the hyperparameters of the existing model initiated by <code>create_model<\/code> so that the model adapts to the data well.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5. Evaluate Model<\/strong><\/h3>\n\n\n\n<p>The <code>evaluate_model<\/code> is used to analyze the model&#8217;s performance through a user interface. When this function is executed, it displays a plot model with many clickable tabs that describe the model&#8217;s performance in the form of hyperparameters, and performance metrics(different for classification and regression), and describes the importance of each feature in the form of a plot.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"949\" height=\"145\" src=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-27.png\" alt=\"Pycaret's Evaluate Model\" class=\"wp-image-61010\" srcset=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-27.png 949w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-27-300x46.png 300w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-27-768x117.png 768w\" sizes=\"auto, (max-width: 949px) 100vw, 949px\" \/><figcaption class=\"wp-element-caption\">Pycaret&#8217;s Evaluate Model<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6. Get Data<\/strong><\/h3>\n\n\n\n<p>Just like many platforms like <a href=\"https:\/\/www.askpython.com\/python-modules\/pretrained-pytorch-models-computer-vision\" data-type=\"post\" data-id=\"59877\">Pytorch,<\/a> TensorFlow, and HuggingFace, the Pycaret library also has toy datasets that can be used for model building and evaluation. The <code>get_data<\/code> function is used to get the data into our environment.<\/p>\n\n\n\n<p>Now, let&#8217;s get to coding!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Regression Example with Pycaret<\/strong><\/h2>\n\n\n\n<p>In this example, we are going to use the <code>get_data<\/code> function to load the insurance data and build a model for this dataset. <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfrom pycaret.datasets import get_data\ndata = get_data(&#039;insurance&#039;)\n<\/pre><\/div>\n\n\n<p>We are importing the <code>get_data<\/code> function from the pycaret library. Then, a variable called data is initialized that stores the insurance data.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"801\" height=\"238\" src=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-28.png\" alt=\"Get Data\" class=\"wp-image-61016\" srcset=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-28.png 801w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-28-300x89.png 300w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-28-768x228.png 768w\" sizes=\"auto, (max-width: 801px) 100vw, 801px\" \/><figcaption class=\"wp-element-caption\">Get Data<\/figcaption><\/figure>\n\n\n\n<p>Now, it is time to set up the initial model pipeline. Since we are looking at a regression example, the prediction label is obviously <code>charges<\/code>. Hence, we pass this as a target to the setup function.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfrom pycaret.regression import *\ns = setup(data, target = &#039;charges&#039;)\n<\/pre><\/div>\n\n\n<p>The setup pipeline is stored in a variable called s.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"410\" height=\"646\" src=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-29.png\" alt=\"Setup\" class=\"wp-image-61017\" srcset=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-29.png 410w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-29-190x300.png 190w\" sizes=\"auto, (max-width: 410px) 100vw, 410px\" \/><figcaption class=\"wp-element-caption\">Setup<\/figcaption><\/figure>\n\n\n\n<p>Let us find the best models available for this task.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nbest = compare_models()\n<\/pre><\/div>\n\n\n<p>The compare_models function is used to compare models and highlight the best one. The best model is saved in a variable called best.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"944\" height=\"661\" src=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-30.png\" alt=\"Compare Models\" class=\"wp-image-61019\" style=\"width:704px;height:auto\" srcset=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-30.png 944w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-30-300x210.png 300w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-30-768x538.png 768w\" sizes=\"auto, (max-width: 944px) 100vw, 944px\" \/><figcaption class=\"wp-element-caption\">Compare Models<\/figcaption><\/figure>\n\n\n\n<p>Additionally, we can also print the best model like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nprint(best)\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"506\" height=\"115\" src=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-31.png\" alt=\"Best Model\" class=\"wp-image-61021\" srcset=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-31.png 506w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-31-300x68.png 300w\" sizes=\"auto, (max-width: 506px) 100vw, 506px\" \/><figcaption class=\"wp-element-caption\">Best Model<\/figcaption><\/figure>\n\n\n\n<p>As we can see, the best model for our use case is the GradientBoostingRegressor(gbr). Now, we can create the gbr model.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ngbr = create_model(&#039;gbr&#039;)\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"654\" height=\"499\" src=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-32.png\" alt=\"Create Model\" class=\"wp-image-61022\" srcset=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-32.png 654w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-32-300x229.png 300w\" sizes=\"auto, (max-width: 654px) 100vw, 654px\" \/><figcaption class=\"wp-element-caption\">Create Model<\/figcaption><\/figure>\n\n\n\n<p>We can evaluate the model based on the hyperparameters, residuals, prediction errors, and some more to name. All these metrics are displayed in the form of a plot.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nevaluate_model(gbr)\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"139\" src=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-33-1024x139.png\" alt=\"Evaluate Model Plot \" class=\"wp-image-61025\" srcset=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-33-1024x139.png 1024w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-33-300x41.png 300w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-33-768x104.png 768w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-33-1536x209.png 1536w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-33.png 1576w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Evaluate Model Plot <\/figcaption><\/figure>\n\n\n\n<p>Each tab of this plot is clickable. Hence, each of them results in a different plot. Take the Feature Importance for instance. <\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"464\" src=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-34-1024x464.png\" alt=\"Feature Importance Plot\" class=\"wp-image-61027\" srcset=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-34-1024x464.png 1024w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-34-300x136.png 300w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-34-768x348.png 768w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-34-1536x696.png 1536w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-34.png 1570w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Feature Importance Plot<\/figcaption><\/figure>\n\n\n\n<p>The next step is to tune the model to improve the performance.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ntuned_gbr = tune_model(gbr)\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"685\" height=\"511\" src=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-35.png\" alt=\"Tuned Model\" class=\"wp-image-61031\" srcset=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-35.png 685w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-35-300x224.png 300w\" sizes=\"auto, (max-width: 685px) 100vw, 685px\" \/><figcaption class=\"wp-element-caption\">Tuned Model<\/figcaption><\/figure>\n\n\n\n<p>We can also plot the residual of the model using the <code>plot_model<\/code>.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n#can also use gbr instead of best \nplot_model(best)\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"772\" height=\"507\" src=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-36.png\" alt=\"Plot Model\" class=\"wp-image-61032\" srcset=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-36.png 772w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-36-300x197.png 300w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-36-768x504.png 768w\" sizes=\"auto, (max-width: 772px) 100vw, 772px\" \/><figcaption class=\"wp-element-caption\">Plot Model<\/figcaption><\/figure>\n\n\n\n<p>Okay! It is time to finalize the model.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfinal_best = finalize_model(best)\nfinal_best\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"522\" height=\"695\" src=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-37.png\" alt=\"Finalized Model\" class=\"wp-image-61033\" srcset=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-37.png 522w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-37-225x300.png 225w\" sizes=\"auto, (max-width: 522px) 100vw, 522px\" \/><figcaption class=\"wp-element-caption\">Finalized Model<\/figcaption><\/figure>\n\n\n\n<p>There is one interesting function I would like to show you. It is the <code>create_app<\/code> function. The create_app function uses gradio to create a demo application in the notebook itself for inference using the features of the data. However, if you are interested, the same can be deployed in Streamlit. <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ncreate_app(final_best)\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"276\" src=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-38-1024x276.png\" alt=\"Create App Interface\" class=\"wp-image-61034\" srcset=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-38-1024x276.png 1024w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-38-300x81.png 300w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-38-768x207.png 768w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-38.png 1316w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Create App Interface<\/figcaption><\/figure>\n\n\n\n<p>The best part is, we can interact with the app!<\/p>\n\n\n\n<figure class=\"wp-block-video aligncenter\"><video height=\"572\" style=\"aspect-ratio: 1562 \/ 572;\" width=\"1562\" controls src=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/Create-App-Demo-1.mp4\"><\/video><figcaption class=\"wp-element-caption\">Create App Demo <\/figcaption><\/figure>\n\n\n\n<p>Based on the feature values(age, sex, number of children&#8230;), we got the prediction_label which is the insurance charge for the person with these features.<\/p>\n\n\n\n<p>The last step is to save the model. We can use the <code>save_model<\/code> function to save the model in a <a href=\"https:\/\/www.askpython.com\/python-modules\/pandas\/loading-pickled-pandas-object\" data-type=\"post\" data-id=\"40603\">pickle <\/a>format.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nsave_model(final_best,&#039;my_gbr&#039;)\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1004\" height=\"757\" src=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-39.png\" alt=\"Saving Successful\" class=\"wp-image-61037\" srcset=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-39.png 1004w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-39-300x226.png 300w, https:\/\/www.askpython.com\/wp-content\/uploads\/2024\/03\/image-39-768x579.png 768w\" sizes=\"auto, (max-width: 1004px) 100vw, 1004px\" \/><figcaption class=\"wp-element-caption\">Saving Successful<\/figcaption><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>The objective of this tutorial is to introduce the important features and functions of the pycaret library. For all the enthusiatic coders, here are the next steps you can experiment with:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Predict the model on a test(unseen) dataset using the <code>predict_model<\/code> function<\/li>\n\n\n\n<li>Create a dashboard of the model using the <code>dashboard<\/code> function<\/li>\n\n\n\n<li>Load the saved model and use it on a different dataset<\/li>\n\n\n\n<li>Apply the same steps for a classification problem!<\/li>\n<\/ul>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Next Steps<\/strong><\/h2>\n\n\n\n<p>Pycaret is a powerful tool for simplifying and accelerating the machine learning workflow. By automating key steps and providing a user-friendly interface, it enables data scientists and developers to build, evaluate, and deploy models efficiently. As you explore Pycaret further, consider how it can be applied to your own projects and datasets. The possibilities are vast &#8211; how will you use Pycaret to drive your machine learning initiatives forward?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>References<\/strong><\/h2>\n\n\n\n<p><a href=\"https:\/\/pycaret.gitbook.io\/docs\/\" target=\"_blank\" rel=\"noopener\">Pycaret documentation<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Machine Learning is a diverse field growing continuously with applications spread across many domains like agriculture, finance, marketing, and many more. To utilize machine learning in any domain, we need first to build a model suitable for the use case. Be it classification, regression, or anomaly detection. Refer to this article on regression vs classification [&hellip;]<\/p>\n","protected":false},"author":55,"featured_media":63911,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-60925","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python-modules"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/posts\/60925","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/comments?post=60925"}],"version-history":[{"count":0,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/posts\/60925\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/media\/63911"}],"wp:attachment":[{"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/media?parent=60925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/categories?post=60925"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/tags?post=60925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}