TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #83 · 11 мај

У строки в Python есть два очень похожих метода. На столько похожих что кажется они делают одно и тоже. Это метод isdigit() и isnumeric() Давайте посмотрим зачем нам два одинаковых метода? И так ли они одинаковы? Очевидно что isdigit() говорит нам, состоит ли строка только из чисел 0-9 >>> '12'.isdigit() True >>> '12x'.isdigit() False >>> '-12'.isdigit() False >>> '12.5'.isdigit() False Можно предположить что isnumeric() делает более глубокий анализ и распознаёт в строке float или отрицательное число. >>> '15'.isnumeric() True >>> '-15'.isnumeric() False >>> '15.2'.isnumeric() False Нет, всё так же как и с другим методом. В чем же тогда разница? Для начала посмотрим следующие примеры: >>> '5'.isdigit(), '5'.isnumeric() # Обычная цифра 5 # True, True >>> '꧕'.isdigit(), '꧕'.isnumeric() # Яванская 5 # True, True >>> '෩'.isdigit(), '෩'.isnumeric() # Синхала 3 # True, True >>> '৩'.isdigit(), '৩'.isnumeric() # Бенгальская 3 # True, True >>> '༣'.isdigit(), '༣'.isnumeric() # Тибетская 3 # True, True >>> '³'.isdigit(), '³'.isnumeric() # 3 верхний индекс (степень) # True, True >>> '𝟝'.isdigit(), '𝟝'.isnumeric() # Математическая двойная 5 # True, True >>> '๔'.isdigit(), '๔'.isnumeric() # Тайская 4 # True, True >>> '➑'.isdigit(), '➑'.isnumeric() # 8 в круге # True, True А теперь примеры в которых, по мнению Python, результаты не равны >>> '¾'.isdigit(), '¾'.isnumeric() # дробь три четверти # False, True >>> '⅕'.isdigit(), '⅕'.isnumeric() # дробь одна пятая # False, True >>> '𒐶'.isdigit(), '𒐶'.isnumeric() # клинопись 3 # False, True >>> '三'.isdigit(), '三'.isnumeric() # 3 из унифицированной идеограммы # False, True >>> '⑩'.isdigit(), '⑩'.isnumeric() # цифра 10 в круге # False, True >>> 'Ⅳ'.isdigit(), 'Ⅳ'.isnumeric() # Римская 4 # False, True >>> '𑇪'.isdigit(), '𑇪'.isnumeric() # Сенегальская архаическая 10 # False, True >>> '𐌢'.isdigit(), '𐌢'.isnumeric() # Этрусская цифра 10 # False, True >>> 'ↂ'.isdigit(), 'ↂ'.isnumeric() # Римская цифра 10000 # False, True >>> '〇'.isdigit(), '〇'.isnumeric() # Символ ККЯ ноль # False, True Получается, что isdigit() говорит нам, является ли символ десятичной цифрой или спецсимволом, имеющим цифирное значение после преобразования. В свою очередь isnumeric() включает все дополнительные символы юникода которые имеют отношения к числовым и цифровым представлениям. Ну и пара примеров в которых в обоих случаях символ не является числом, это эмодзи. >>> '🕙'.isdigit(), '🕙'.isnumeric() # эмодзи 10 часов # False, False >>> '7️⃣'.isdigit(), '7️⃣'.isnumeric() # эмодзи 7 # False, False Также есть еще один дополнительный и весьма полезный метод isdecimal(). Он нам сообщает, можно ли из указанного символа сделать простую десятичную цифру. То есть сработает ли метод int(x) >>> '෩'.isdecimal(), int('෩') # Синхала 3 # True, 3 >>> '➑'.isdecimal(), int('➑') # 8 в круге # False, ValueError Какие выводы? 🔸 При определении цифры в строке isdigit() подходит лучше чем isnumeric(), но оба не гарантируют успешную конвертацию в int 🔸 Для однозначного определения возможности преобразования строки в int лучше подходит метод isdecimal() 🔸 Для однозначного определения символов 0...9 лучше использовать regex Полный список символов юникода которые определяются как numeric #basic

Hashtags

Резултати

Пронајдени 25 слични објави

Пребарај: #salmon

当前筛选 #salmon清除筛选
美食素材圈

@meishi_sucai · Post #22862 · 27.02.2026 г., 07:36

#三文鱼#salmon ➖➖➖➖➖➖➖➖ 📚【话术需求区】点击.... 👄【深夜小电影】点击.... 🧑🏼‍🦰【人设套图区】点击.... 🔞【人设私密照】点击.... 👨‍🎨【绘画频道区】点击.... 🛵【 跑腿代购 】点击.... 👉广告投放

Data Science Jobs

@datasciencejobs · Post #2725 · 19.05.2025 г., 14:02

#vacancy#DataScience#remote#fulltime#Salmon Data Scientist (Junior+/Middle) 🌍 Preference will be given to candidates open to relocating to Manila; remote work is also possible with an initial working trip to Manila for 1–2 months Please note: we support remote work, but cannot hire candidates based in Russia or Belarus. Compensation: 4000-5000$ We’re looking for a thoughtful and detail-oriented Data Analyst / Data Scientist to join our team. In this role, you’ll work with large datasets, build clear visualizations, and deliver insights that directly shape decision-making while collaborating with analysts, engineers, and stakeholders across the company. Your future tasks: - Maintain and expand existing data science projects using Python, SQL, AWS, and GitLab - Analyze large datasets to uncover actionable insights and present them through dashboards and visual reports - Develop real-time monitoring tools to track key performance metrics - Collaborate cross-functionally with business analysts, software engineers, and stakeholders to understand requirements and deliver solutions What we expect from candidate: - 1+ years of experience in a similar data-focused role (data science, analytics, or related) - Strong SQL proficiency – able to write complex, optimized queries using joins, window functions, CTEs; experience with large-scale datasets is a plus - Proficient in Python for data science, using libraries such as Pandas, NumPy, and SciPy for analysis and automation - Solid grounding in statistical analysis – hypothesis testing, regression, distributions, and their application to real-world business use cases (e.g., A/B testing, forecasting) - Confident in data visualization – can build clear, effective visuals using Matplotlib, Seaborn, or tools like Tableau - Comfortable with version control systems – hands-on experience with GitLab (or similar tools like GitHub) - Experience with AWS is a plus Why join Salmon: - Passionate international team spanning the globe - Rapid professional growth. Merit (and merit only) rules the day - Reward for performance and long-term success of Salmon - Fast track to grow internationally - New office in Manila, Philippines - Relocation support for eligible candidates - Remote and hybrid options - Medical insurance, health and wellness benefits - Program of events and activities both online and in person 👉 More information and apply: @an_salmon

Data Science Jobs

@datasciencejobs · Post #2727 · 20.05.2025 г., 09:02

#vacancy#MachineLearning#remote#fulltime#Salmon Machine Learning Engineer 🌍 Preference will be given to candidates open to relocating to Manila; remote work is also possible with an initial working trip to Manila for 1–2 months Please note: we support remote work, but cannot hire candidates based in Russia or Belarus. Compensation: 4000-5000$ We’re looking for a curious and impact-driven Machine Learning Engineer to join our team and accelerate the development of robust, high-performing ML solutions across key business areas—including credit scoring, collection, antifraud, sales and other. This role combines hands-on development with strategic input, offering a chance to work on high-stakes, high-visibility projects from day one, collaborating with multiple departments and stakeholders to drive measurable business impact through better models What you'll do: - Own the end-to-end lifecycle of ML models: from EDA, feature generation, and hypothesis testing to production deployment and monitoring - Evaluate model performance and business impact, and iterate for continuous improvement - Explore and integrate new data sources (internal and external), identifying additional predictive signals - Contribute to advancements in modeling techniques, including geospatial and graph-based methods where relevant - Contribute to advancements in modeling techniques by exploring new algorithms and architectures What we’re looking for: - 2+ years of experience as a Machine Learning Engineer or Data Scientist, ideally in fintech or fast-paced product environments - Strong skills in Python and SQL; comfortable using Git - Solid foundation in classical ML techniques and Statistics; fluency in libraries, such as Pandas, Scikit-learn, NumPy, SciPy, Matplotlib/Seaborn/Plotly, Statsmodels, XGBoost/LightGBM/CatBoost etc. - Experience in credit risk modeling is a strong plus - Background in graph ML and/or experience with advanced geospatial analytics is an advantage - Experience working with AWS (or other cloud environments) is a plus Why join Salmon? What we’re building — Licensed neobank scaling modern financial services in Southeast Asia — Backed by global investors (ADQ, World Bank Group) with $60MM+ raised — Rapid product cycles: go from idea to launch in ~3 months — High-growth, high-impact market with global expansion potential What we offer — Remote or hybrid setup (GMT+5 to GMT+10 preferred) — New office in Manila with relocation support for eligible candidates — Competitive compensation in USD — Equity options and performance-based rewards — Medical insurance and wellness support — International team and fast career growth based on merit — Company-sponsored events and offsites 👉 More information and apply here: @an_salmon

美食素材圈

@meishi_sucai · Post #22982 · 30.03.2026 г., 01:55

#三文鱼#海鲜#晚餐#salmon ➖➖➖➖➖➖➖➖ 📚【话术需求区】点击.... 👄【深夜小电影】点击.... 🧑🏼‍🦰【人设套图区】点击.... 🔞【人设私密照】点击.... 👨‍🎨【绘画频道区】点击.... 🛵【 跑腿代购 】点击.... 👉广告投放

ПретходнаСтраница 1 од 3Следна