File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -382,8 +382,8 @@ trailing blanks.
382382
383383.. ipython :: python
384384
385- tips[' time' ].str.len()
386- tips[' time' ].str.rstrip().str.len()
385+ tips[' time' ].str.len().head()
386+ tips[' time' ].str.rstrip().str.len().head()
387387
388388
389389 Find
@@ -398,7 +398,7 @@ you supply as the second argument.
398398
399399 data _null_;
400400 set tips;
401- put(FINDW(sex,'ALE '));
401+ put(FINDW(sex,'ale '));
402402 run;
403403
404404 Python determines the position of a character in a string with the
@@ -409,7 +409,7 @@ the function will return -1 if it fails to find the substring.
409409
410410.. ipython :: python
411411
412- tips[' sex' ].str.find(" ALE " )
412+ tips[' sex' ].str.find(" ale " ).head( )
413413
414414
415415 Substring
@@ -431,7 +431,7 @@ indexes are zero-based.
431431
432432.. ipython :: python
433433
434- tips[' sex' ].str[0 :1 ]
434+ tips[' sex' ].str[0 :1 ].head()
435435
436436
437437 Scan
@@ -451,7 +451,7 @@ second argument specifies which word you want to extract.
451451 John Smith;
452452 Jane Cook;
453453 ;;;
454- run;
454+ run;
455455
456456 Python extracts a substring from a string based on its text
457457by using regular expressions. There are much more powerful
You can’t perform that action at this time.
0 commit comments