

{"id":79307,"date":"2020-07-20T14:09:10","date_gmt":"2020-07-20T08:39:10","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=79307"},"modified":"2021-05-09T13:13:38","modified_gmt":"2021-05-09T07:43:38","slug":"numpy-string-functions","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/numpy-string-functions\/","title":{"rendered":"NumPy String Functions &#8211; String Operations in NumPy"},"content":{"rendered":"<p>NumPy library contains the numpy.char module for performing NumPy string functions. It consists of a set of vectorized string operations. The functions available are similar to the string operations in python. We perform these functions on arrays of string type<\/p>\n<h2>NumPy String Functions<\/h2>\n<p>NumPy string operations are of three types-<\/p>\n<ul>\n<li>String operations<\/li>\n<li>String information<\/li>\n<li>NumPy String comparisons<\/li>\n<\/ul>\n<h3>1. NumPy String Operations<\/h3>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/String-Operations-in-NmuPy.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79501\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/String-Operations-in-NmuPy.jpg\" alt=\"String Operations in Numpy\" width=\"704\" height=\"564\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/String-Operations-in-NmuPy.jpg 704w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/String-Operations-in-NmuPy-300x240.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/String-Operations-in-NmuPy-150x120.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/String-Operations-in-NmuPy-520x417.jpg 520w\" sizes=\"auto, (max-width: 704px) 100vw, 704px\" \/><\/a><\/p>\n<p>These are string functions used to return strings after applying functions over the input strings.<\/p>\n<p><strong>a. np.lower() &#8211;<\/strong> It converts all the upper case characters in the string to lower case. If there are no upper-case characters, then it returns the original string.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import numpy as np\r\n \r\n#lower case\r\nprint(np.char.lower(['Data', 'Flair']))\r\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">[&#8216;data&#8217; &#8216;flair&#8217;]<\/div>\n<p><strong>b. np.upper()-<\/strong> It converts all the lower case characters in the string to upper case. If there are no lower-case characters, then it returns the original string.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\"> \r\n#upper case\r\nprint(np.char.upper(['Data', 'Flair']))<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">[&#8216;DATA&#8217; &#8216;FLAIR&#8217;]<\/div>\n<p><strong>c. np.split()-<\/strong> This function returns a string after breaking the string, separated by an input separator.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#split\r\nprint(np.char.split(\"Data Flair\"))\r\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">[&#8216;Data&#8217;, &#8216;Flair&#8217;]<\/div>\n<p><strong>d. np.join()-<\/strong> This is a string method that joins the given string by a particular separator.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#join\r\nprint(np.char.join(\"-\" ,\"DataFlair\"))<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">D-a-t-a-F-l-a-i-r<\/div>\n<p><strong>e. np.strip()-<\/strong> This is useful to strip off all the leading and trailing white spaces from a string.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\"> \r\n#strip\r\nprint(np.char.strip(\"   DataFlair    \"))<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">DataFlair<\/div>\n<p><strong>f. np.capiatlize()-<\/strong> This function is useful to capitalize or upper case the first character of the string.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#capital\r\nprint(np.char.capitalize(\"capital\"))<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">Capital<\/div>\n<p><strong>g. np.title()- <\/strong>This function helps to convert the first character to upper-case.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\"> \r\n#title\r\nprint(np.char.title(\"data flair\"))\r\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">Data Flair<\/div>\n<p><strong>h. np.center()-<\/strong> It returns a new string with specific padding.<\/p>\n<p><strong>i. np.encode()-<\/strong> It returns the encoded string.<\/p>\n<p><strong>j. np.decode()-<\/strong> It returns the decoded string.<\/p>\n<p><strong>k. np.ljust()-<\/strong> It returns left-justified text<\/p>\n<p><strong>l. np.rjust()-<\/strong> It returns right-justified text<\/p>\n<h2>2. NumPy String Information<\/h2>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/String-Information-in-NumPy.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79499\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/String-Information-in-NumPy.jpg\" alt=\"String Information in NumPy\" width=\"770\" height=\"470\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/String-Information-in-NumPy.jpg 770w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/String-Information-in-NumPy-300x183.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/String-Information-in-NumPy-150x92.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/String-Information-in-NumPy-768x469.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/String-Information-in-NumPy-520x317.jpg 520w\" sizes=\"auto, (max-width: 770px) 100vw, 770px\" \/><\/a><\/p>\n<p>These functions are useful to retain certain information and characters from the input string.<\/p>\n<p><strong>a. np.count()-<\/strong> It returns the count of the passed substring from the entire string<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import numpy as np\r\narr=np.array(['aa','ab','bc'])\r\n \r\n# count\r\nprint(np.char.count(arr,'a'))\r\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">[2 1 0]<\/div>\n<p><strong>b. np.find()-<\/strong> This function is used to return the lowest index of the substring if present in the input string.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import numpy as np\r\narr=np.array(['aa','ab','bc'])\r\n \r\n# find\r\nprint(np.char.find(arr,'a'))\r\n \r\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">[ 0 0 -1]<\/div>\n<p><strong>c. np.rfind()-<\/strong> This function returns the highest index of the substring if present in the input string.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import numpy as np\r\narr=np.array(['aa','ab','bc'])\r\n \r\n# rfind\r\nprint(np.char.rfind(arr,'a'))\r\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">[ 1 0 -1]<\/div>\n<p><strong>d. np.isnumeric()-<\/strong> This function is used to detect numeric values. It returns \u201cTrue\u201d if all the string characters are numeric.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import numpy as np\r\narr=np.array(['1','2','3'])\r\n \r\n# numeric values\r\nprint(np.char.isnumeric(arr))\r\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">[ True True True]<\/div>\n<p><strong>e. np.isalpha()-<\/strong> This function is used to detect alphabets. It returns \u201cTrue\u201d if all the string characters are alphabets.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import numpy as np\r\narr=np.array(['aa','ab','bc'])\r\n \r\n# alphabets\r\nprint(np.char.isalpha(arr))<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">[ True True True]<\/div>\n<p><strong>f. np.isdecimal()-<\/strong> This function is used to detect decimal values. It returns \u201cTrue\u201d if all the string characters are decimal numbers.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import numpy as np\r\narr=np.array(['1','2','3'])\r\n \r\n# decimal values\r\nprint(np.char.isdecimal(arr))<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">[ True True True]<\/div>\n<p><strong>g. np.isdigit()-<\/strong> This function is used to detect digits. It returns \u201cTrue\u201d if all the string characters are digits.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import numpy as np\r\narr=np.array(['1','b','3'])\r\n \r\n# digits \r\nprint(np.char.isdigit(arr))<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">[ True False True]<\/div>\n<p><strong>h. np.islower()-<\/strong> This function is used to find lower case values. It returns \u201cTrue\u201d if all the string characters are lower case.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import numpy as np\r\narr=np.array(['a','b','C'])\r\n \r\n# lowercase values\r\nprint(np.char.islower(arr))<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">[ True True False]<\/div>\n<p><strong>i. np.isupper()-<\/strong> This function is used to detect upper case. It returns \u201cTrue\u201d if all the string characters are upper case.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import numpy as np\r\narr=np.array(['a','b','C'])\r\n \r\n# upppercase values\r\nprint(np.char.isupper(arr))\r\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">[False False True]<\/div>\n<p><strong>j. np.isspace()-<\/strong> This function returns true if all the characters of the string are white spaces otherwise returns false.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import numpy as np\r\narr=np.array(['a',' ','C'])\r\n \r\n# white space\r\nprint(np.char.isspace(arr))\r\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">[False True False]<\/div>\n<p><strong>k. np.istitle()-<\/strong> This function returns true only if the string is title cased.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import numpy as np\r\narr=np.array(['Xyz Abc'])\r\n \r\n# title\r\nprint(np.char.istitle(arr))\r\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">[ True]<\/div>\n<h2>3. NumPy String Comparisons<\/h2>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/String-Comparisons-in-NumPy.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79498\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/String-Comparisons-in-NumPy.jpg\" alt=\"String Comparisons in NumPy\" width=\"700\" height=\"383\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/String-Comparisons-in-NumPy.jpg 700w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/String-Comparisons-in-NumPy-300x164.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/String-Comparisons-in-NumPy-150x82.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/String-Comparisons-in-NumPy-520x285.jpg 520w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/p>\n<p>These functions return Boolean values, true or false after making comparisons between two strings<\/p>\n<p><strong>a. np.equal()-<\/strong> This function checks elements wise equivalence. It returns true only if all the elements are equal.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import numpy as np\r\n \r\n \r\n# equal\r\nprint(np.char.equal('aa','aa'))\r\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">True<\/div>\n<p><strong>b. np.not_equal()-<\/strong> This function checks whether two strings are equal or not.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import numpy as np\r\n# not equal\r\nprint(np.char.not_equal('ab','aa'))\r\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">True<\/div>\n<p><strong>c. np.greater()-<\/strong> This function returns true if the first string is greater than the second string.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import numpy as np\r\n# greater than\r\nprint(np.char.greater('abc','aa'))\r\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">True<\/div>\n<p><strong>d. np.less()-<\/strong> This function returns true if the first string is less than the second string.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import numpy as np\r\n# less than\r\nprint(np.char.less('a','aaxx'))<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">True<\/div>\n<p><strong>e. np.greater_equal()-<\/strong> This function returns true if the first string is greater than or equal to the second string.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import numpy as np\r\n# greater than equal to\r\nprint(np.char.greater_equal('a','aa'))\r\n \r\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">False<\/div>\n<p><strong>f. np.less_equal()-<\/strong> This function returns true if the first string is less than or equal to the second string.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import numpy as np\r\n# less than equal to\r\nprint(np.char.less_equal('a','aaxx'))\r\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">True<\/div>\n<h2>Summary<\/h2>\n<p>There is a vast range of NumPy string functions applicable to strings. The functions are of three categories, string operations, string information, and string comparisons.<\/p>\n<p>The char module is useful to apply these string functions. The string functions increase is based on the in-built string functions in Python.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NumPy library contains the numpy.char module for performing NumPy string functions. It consists of a set of vectorized string operations. The functions available are similar to the string operations in python. We perform these&#46;&#46;&#46;<\/p>\n","protected":false},"author":6,"featured_media":79497,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22401],"tags":[22692,22689,22690,22691],"class_list":["post-79307","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-numpy","tag-numpy-string-comparisons","tag-numpy-string-functions","tag-numpy-string-operations","tag-string-operations-in-numpy"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>NumPy String Functions - String Operations in NumPy - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn about Numpy String Functions - These are Numpy String Operations, String information and String Comparisons like np.join, np.isupper, np,islower etc.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/numpy-string-functions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"NumPy String Functions - String Operations in NumPy - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn about Numpy String Functions - These are Numpy String Operations, String information and String Comparisons like np.join, np.isupper, np,islower etc.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/numpy-string-functions\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-20T08:39:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-09T07:43:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/NumPy-String-Functions.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"NumPy String Functions - String Operations in NumPy - DataFlair","description":"Learn about Numpy String Functions - These are Numpy String Operations, String information and String Comparisons like np.join, np.isupper, np,islower etc.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/numpy-string-functions\/","og_locale":"en_US","og_type":"article","og_title":"NumPy String Functions - String Operations in NumPy - DataFlair","og_description":"Learn about Numpy String Functions - These are Numpy String Operations, String information and String Comparisons like np.join, np.isupper, np,islower etc.","og_url":"https:\/\/data-flair.training\/blogs\/numpy-string-functions\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2020-07-20T08:39:10+00:00","article_modified_time":"2021-05-09T07:43:38+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/NumPy-String-Functions.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/numpy-string-functions\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/numpy-string-functions\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89"},"headline":"NumPy String Functions &#8211; String Operations in NumPy","datePublished":"2020-07-20T08:39:10+00:00","dateModified":"2021-05-09T07:43:38+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/numpy-string-functions\/"},"wordCount":767,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/numpy-string-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/NumPy-String-Functions.jpg","keywords":["NumPy string comparisons","numpy string functions","numpy string operations","String operations in numpy"],"articleSection":["NumPy Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/numpy-string-functions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/numpy-string-functions\/","url":"https:\/\/data-flair.training\/blogs\/numpy-string-functions\/","name":"NumPy String Functions - String Operations in NumPy - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/numpy-string-functions\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/numpy-string-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/NumPy-String-Functions.jpg","datePublished":"2020-07-20T08:39:10+00:00","dateModified":"2021-05-09T07:43:38+00:00","description":"Learn about Numpy String Functions - These are Numpy String Operations, String information and String Comparisons like np.join, np.isupper, np,islower etc.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/numpy-string-functions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/numpy-string-functions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/numpy-string-functions\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/NumPy-String-Functions.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/NumPy-String-Functions.jpg","width":1200,"height":628,"caption":"NumPy String functions"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/numpy-string-functions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"NumPy Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/numpy\/"},{"@type":"ListItem","position":3,"name":"NumPy String Functions &#8211; String Operations in NumPy"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team provides industry-driven content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our expert educators focus on delivering value-packed, easy-to-follow resources for tech enthusiasts and professionals.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam2\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/79307","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=79307"}],"version-history":[{"count":5,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/79307\/revisions"}],"predecessor-version":[{"id":93073,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/79307\/revisions\/93073"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/79497"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=79307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=79307"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=79307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}