File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -382,8 +382,8 @@ trailing blanks.
382
382
383
383
.. ipython :: python
384
384
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()
387
387
388
388
389
389
Find
@@ -398,7 +398,7 @@ you supply as the second argument.
398
398
399
399
data _null_;
400
400
set tips;
401
- put(FINDW(sex,'ALE '));
401
+ put(FINDW(sex,'ale '));
402
402
run;
403
403
404
404
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.
409
409
410
410
.. ipython :: python
411
411
412
- tips[' sex' ].str.find(" ALE " )
412
+ tips[' sex' ].str.find(" ale " ).head( )
413
413
414
414
415
415
Substring
@@ -431,7 +431,7 @@ indexes are zero-based.
431
431
432
432
.. ipython :: python
433
433
434
- tips[' sex' ].str[0 :1 ]
434
+ tips[' sex' ].str[0 :1 ].head()
435
435
436
436
437
437
Scan
@@ -451,7 +451,7 @@ second argument specifies which word you want to extract.
451
451
John Smith;
452
452
Jane Cook;
453
453
;;;
454
- run;
454
+ run;
455
455
456
456
Python extracts a substring from a string based on its text
457
457
by using regular expressions. There are much more powerful
You can’t perform that action at this time.
0 commit comments