Python and Unicode characters

  Рет қаралды 6,250

Python and Pandas with Reuven Lerner

Python and Pandas with Reuven Lerner

Күн бұрын

What is Unicode? How can we insert Unicode characters into strings? What's the difference between \x, \u, and \U? How can we insert characters with their names?
In this video, I answer these and many other questions about Unicode and Python characters.
The Jupyter notebook for this video is on GitHub, at github.com/reu....
And don't forget my free, weekly "Better developers" newsletter at BetterDevelope...!

Пікірлер: 16
@pauloalmeida4807
@pauloalmeida4807 Жыл бұрын
The only place where this is very well explained! Thumbs UP!
@ReuvenLerner
@ReuvenLerner Жыл бұрын
Thanks!
@JoshPaulie
@JoshPaulie 2 жыл бұрын
That's a sub from me!! Great video. Every few seconds is another great tidbit
@ReuvenLerner
@ReuvenLerner 2 жыл бұрын
Thanks, great to hear!
@elise254
@elise254 2 жыл бұрын
love u reuven
@ReuvenLerner
@ReuvenLerner 2 жыл бұрын
Thanks so much!
@MatthewThompson-g8f
@MatthewThompson-g8f Жыл бұрын
In my Python.kv File i wanted to show a button with a Symbol, but nothing works and it seems, that the kv-file is not connected with the imported library unicodedata. Also chr and /U"20103" does not work in a kivy *.kv file and i can use it only in the python main.py. Button: text: '\N{CJK UNIFIED IDEOGRAPH-4E2D}' # This doesn't work Do you have an idea?
@ReuvenLerner
@ReuvenLerner Жыл бұрын
Sorry, I don't know anything about Kivy!
@365bee
@365bee Жыл бұрын
mybe you can use "\u4e2d" instead
@obed818
@obed818 2 жыл бұрын
Hello Reuven, may i ask you something; if i define two string with the same content(a=«hello»,b=«hello») , it will give me the same id for both, but not if there is a space in it, which is very weird as space is in the ascii table, i noticed when using foreign character the id is always different not as with Latin character. Ive noticed very weird behavior when experimenting with object id this week some real non-sense, i would be interested to read about it if you have something to recommend me, if there is some python implementation as i dont code in C. Thank you, have a great day
@ReuvenLerner
@ReuvenLerner 2 жыл бұрын
Take a look at this blog post I wrote, which explains the issue: lerner.co.il/2015/06/16/why-you-should-almost-never-use-is-in-python/
@obed818
@obed818 2 жыл бұрын
@@ReuvenLerner thank you gonna read it!
@iiannRB
@iiannRB Жыл бұрын
hello, I would like to replace LEFT (and right) SINGLE QUOTATION MARK ‘ ’ by APOSTROPHE ' in python. Also RIGHT DOUBLE QUOTATION MARK “ ”(and left) by QUOTATION MARK " . Anybody knows how please? I want to write them to text file from imported request.
@Kai_Ning
@Kai_Ning 2 жыл бұрын
Counting on your fingers in base 16 is easier than in base 10. Where in base 10 you need both your hands, in base 16 you need one. Have your thumb point at each phalanges of the other 4 fingers and it's base 12, add your finger tips or nails and it's base 16... add both and its base 20. I'm pretty sure that mastering that when you're learning to count would help ease that infamous math allergy a lot of people get when they start to learn the fundamentals of algebra at 5/6yo as it can trivialize the simplest additions, substractions and divisions.
@ReuvenLerner
@ReuvenLerner 2 жыл бұрын
First: That's a great trick for working in base 16! Second: I was actually part of a famous math curriculum known as "New Math" in the 1970s that taught number bases to kids in elementary school. (We also learned modular arithmetic and set theory.) It is famous for being one of the greatest disasters in math education. It confused children (and teachers), and didn't improve their scores. Nerds like me thought it was super interesting and useful, and when I got to college, no one believed me when I said I had learned modular arithmetic in 4th grade. But as a general educational strategy, it was a massive failure. I tried to teach number bases to my own children, but it managed to both bore and confuse them. Oh, well.
@Kai_Ning
@Kai_Ning 2 жыл бұрын
@@ReuvenLerner Wow, that second point is mind blowing. I would expect children to be more receptive to number bases math. Maybe that's just more intuitive to count on your finger in base 12/16 but that's it ? Anyway modular arithmetic in 4th grade... that's crazy! I learned that in my last year of high school and only because i had chosen the "math specialty" in an already scientific curriculum.
Three ways to use Python's "vars" function
8:14
Python and Pandas with Reuven Lerner
Рет қаралды 2 М.
What does "if __name__ == '__main__' " do in Python?
14:03
Python and Pandas with Reuven Lerner
Рет қаралды 6 М.
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
Characters, Symbols and the Unicode Miracle - Computerphile
9:37
Computerphile
Рет қаралды 2 МЛН
Character encoding in Python made easy
14:32
Sebastiaan Mathôt
Рет қаралды 14 М.
Understanding (and avoiding) the SettingWithCopyWarning in Pandas
8:11
Python and Pandas with Reuven Lerner
Рет қаралды 4,4 М.
5 Useful F-String Tricks In Python
10:02
Indently
Рет қаралды 347 М.
Unicode vs UTF-8
9:11
Daniel Duan
Рет қаралды 30 М.
Talk: James Bennett - A 🐍's guide to Unicode
44:25
PyCon US
Рет қаралды 2,7 М.
Protocol Or ABC In Python - When to Use Which One?
23:45
ArjanCodes
Рет қаралды 207 М.
Basic grouping in pandas
8:09
Python and Pandas with Reuven Lerner
Рет қаралды 4 М.
10 ULTIMATE Python Tips 🔥
16:42
Tech With Tim
Рет қаралды 75 М.