text stringlengths 1 81 | start float64 0 10.1k | duration float64 0 24.9 |
|---|---|---|
the right of the comma and based on the | 5,154.48 | 4.159 |
input this would be the user's last name | 5,156.48 | 4.32 |
in this scenario me this would be the | 5,158.639 | 5.161 |
user's first name David in this scenario | 5,160.8 | 5.72 |
that's why I'm using group one for the | 5,163.8 | 5.319 |
last name and group two for the first | 5,166.52 | 4.32 |
name and now I'm going to go ahead and | 5,169.119 | 6.281 |
say name equals uh F string again uh | 5,170.84 | 9.56 |
first and then last done and let me | 5,175.4 | 7.16 |
refine this one last step before we take | 5,180.4 | 3.92 |
questions I don't really need these | 5,182.56 | 3.76 |
variables if I'm immediately using them | 5,184.32 | 3.319 |
let's just go ahead and tighten this up | 5,186.32 | 2.76 |
further as we've done in the past for | 5,187.639 | 4.04 |
design sake if I want to make the name | 5,189.08 | 4.559 |
the concatenation of the person's first | 5,191.679 | 3.721 |
name and last name let's just do this | 5,193.639 | 6.961 |
matches. group two first plus a space | 5,195.4 | 8.799 |
plus matches. group one so it's just up | 5,200.6 | 5.76 |
to me to know from left to right this is | 5,204.199 | 4.601 |
group one this is group two so group one | 5,206.36 | 5.12 |
is last group two is first so if I want | 5,208.8 | 5.08 |
to flip them around and update the value | 5,211.48 | 4.92 |
of name name I can explicitly get group | 5,213.88 | 5.48 |
two first concatenate using plus a | 5,216.4 | 5.56 |
single space and then concatenate on | 5,219.36 | 6.04 |
group one all right that was a lot let | 5,221.96 | 5.6 |
me pause to see if there are questions | 5,225.4 | 3.6 |
the key difference here is we're still | 5,227.56 | 4.4 |
using re. search the exact same way but | 5,229 | 5.52 |
now I'm using its return value not just | 5,231.96 | 4.8 |
to answer a question true or false but | 5,234.52 | 4.719 |
to actually get back specific matches | 5,236.76 | 5.6 |
anything I captured so to speak with | 5,239.239 | 5.521 |
parentheses why is it here we're using | 5,242.36 | 4.879 |
one and two instead of zero and one | 5,244.76 | 4.439 |
really good question caping the first a | 5,247.239 | 3.801 |
good observation in almost every other | 5,249.199 | 3.881 |
context we've started counting at zero | 5,251.04 | 4.48 |
and one instead of one and two it turns | 5,253.08 | 4.52 |
out there's something else in location | 5,255.52 | 4.36 |
zero when it comes back from re. search | 5,257.6 | 4.16 |
related to the string itself so | 5,259.88 | 3.799 |
according to the documentation of this | 5,261.76 | 4.879 |
function only one is the first set of | 5,263.679 | 5.401 |
parentheses and two is the second set | 5,266.639 | 4.721 |
and onward from there just a different | 5,269.08 | 4.84 |
convention here other questions uh what | 5,271.36 | 6.56 |
if we write nothing like whes space | 5,273.92 | 7.68 |
comma whes space uh how how we check um | 5,277.92 | 6.6 |
true of condition before I answer | 5,281.6 | 4.28 |
directly let me just run this and make | 5,284.52 | 2.88 |
sure I've not broken anything further | 5,285.88 | 3.88 |
let me run python of format. let me type | 5,287.4 | 4.839 |
in David space ma the right way let me | 5,289.76 | 4.56 |
run it once more let me type it Ma comma | 5,292.239 | 4.44 |
David the wrong way that we're fixing | 5,294.32 | 4.44 |
and we're still good but I think it will | 5,296.679 | 3.721 |
still break let me run it a third time | 5,298.76 | 5.16 |
with ma comma David with no space and | 5,300.4 | 6.759 |
now now it's still broken why because | 5,303.92 | 7.279 |
I'm still looking for comma space now | 5,307.159 | 5.761 |
how can I fix that one way I could do | 5,311.199 | 3.44 |
that is to add a question mark here | 5,312.92 | 3.84 |
which again is zero or more of the thing | 5,314.639 | 4.6 |
before so if I have a space and then a | 5,316.76 | 4.32 |
question mark literally no need for any | 5,319.239 | 4.641 |
parentheses then I can literally | 5,321.08 | 6.599 |
tolerate both ma comma space David or ma | 5,323.88 | 6.359 |
comma David so let's try again before | 5,327.679 | 4.52 |
this did not work let's do ma comma | 5,330.239 | 5.241 |
David with no space now it does actually | 5,332.199 | 5.081 |
work so we can tolerate different | 5,335.48 | 4.12 |
amounts of white space if I am a little | 5,337.28 | 5.04 |
more precise with my formula let me go | 5,339.6 | 4.4 |
ahead and try once more let me very | 5,342.32 | 3.919 |
weirdly but possibly hit the space bar a | 5,344 | 4.08 |
few too many times so now they're really | 5,346.239 | 5 |
separated this again is uh not going to | 5,348.08 | 5.079 |
work quite right because it's going to | 5,351.239 | 4.601 |
consume all of that white space so now I | 5,353.159 | 5.161 |
might want to strip left and right any | 5,355.84 | 4.56 |
of the leading white space on the result | 5,358.32 | 4.72 |
or what I could do here is say this | 5,360.4 | 6.48 |
instead of zero or one I could use a | 5,363.04 | 7.4 |
star here so space star and now if I run | 5,366.88 | 5.839 |
this once more with ma comma space space | 5,370.44 | 4.6 |
space David enter now we've cleaned up | 5,372.719 | 4.321 |
things further so you can imagine | 5,375.04 | 4.199 |
depending on how messy the data is that | 5,377.04 | 3.639 |
you're cleaning up your regular | 5,379.239 | 3 |
Expressions might need to get more and | 5,380.679 | 3.56 |
more sophisticated it really depends on | 5,382.239 | 4.081 |
just how many problems we want to solve | 5,384.239 | 4.92 |
at once well allow me to propose that we | 5,386.32 | 5.24 |
Forge ahead further just to clean this | 5,389.159 | 4.401 |
up even more so using a feature that's | 5,391.56 | 5.079 |
actually relatively new to python itself | 5,393.56 | 5.119 |
it is very common when using regular | 5,396.639 | 3.961 |
Expressions to do exactly what I've done | 5,398.679 | 4.801 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.