Posts

Showing posts from September 22, 2018

Vātsyāyana

Image
Vātsyāyana From Wikipedia, the free encyclopedia   (Redirected from Vatsyayana) Jump to navigation Jump to search This article needs additional citations for verification . Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (June 2010) (Learn how and when to remove this template message) Vātsyāyana Occupation Philosopher Nationality Indian Genre essay Subject human sexuality Notable works Kama Sutra Vātsyāyana is the name of an ancient Indian philosopher, known for writing the Kama Sutra , the most famous book in the world on human sexuality. He lived in India during the second or third century CE, probably in Pataliputra (modern day Patna). [1] He is not to be confused with Pakṣilasvāmin Vātsyāyana, the author of Nyāya Sutra Bhāshya , the first preserved commentary on Gotama's Nyāya Sutras . [2] [3] His name is sometimes erroneously confused with Mallanaga, t

Pandas Replace 1st Result in a DataFrame

Pandas Replace 1st Result in a DataFrame Let's say I have a dataframe that looks like this: df4 df4 = pd.DataFrame('Q':['apple', 'apple', 'orange', 'Apple', 'orange'], 'R':['a.txt', 'a.txt', 'a.txt', 'b.txt', 'b.txt']) >>> df4 Q R 0 apple a.txt 1 apple a.txt 2 orange a.txt 3 Apple b.txt 4 orange b.txt What I would like to output is this: Q R 0 breakfast a.txt 1 apple a.txt 2 orange a.txt 3 breakfast b.txt 4 orange b.txt In other words, case insensitive, I want to search every row in a dataframe, find the first occurrence of certain words (in this case, that word is apple), and replace it with another word. Is there a way to do this? 2 Answers 2 Here's a vectorised solution with groupby and idxmin : groupby idxmin v = df.Q.str.lower().eq('apple') v2 = (~v).cumsum().where(v) df.loc[v2.groupby(v2).idxmin().values, 'Q'] = 'breakfast' df Q R 0

Bhakti movement

Image
Bhakti movement From Wikipedia, the free encyclopedia Jump to navigation Jump to search Part of a series on Hinduism Hindu History Concepts Worldview Hindu cosmology Puranic chronology Hindu mythology God / Highest Reality Brahman Ishvara God in Hinduism God and gender Life Ashrama (stage) Brahmacharya Grihastha Vanaprastha Sannyasa Purusharthas Dharma Artha Kama Moksha Liberation Atman Maya Karma Samsara Ethics Niti shastra Yamas Niyama Ahimsa Asteya Aparigraha Brahmacharya Satya Damah Dayā Akrodha Arjava Santosha Tapas Svādhyāya Shaucha Mitahara Dāna Liberation Bhakti yoga Jnana yoga Karma yoga Schools Six Astika schools Samkhya Yoga Nyaya Vaisheshika Mimamsa Vedanta Advaita Dvaita Vishishtadvaita Other schools Pasupata Saiva Pratyabhijña Raseśvara Īśvara Pāṇini Darśana Charvaka Deities Trimurti Brahma Vishnu Shiva Other major Devas / Devis Vedic Indra Agni Prajapati Rudra Devi Saraswati Ushas Varuna Vayu Post-Vedic Durga Ganesha Hanuman