No video

How do I change display options in pandas?

  Рет қаралды 41,903

Data School

Data School

8 жыл бұрын

Have you ever wanted to change the way your DataFrame is displayed? Perhaps you needed to see more rows or columns, or modify the formatting of numbers? In this video, I'll demonstrate how to change the settings for five common display options in pandas.
SUBSCRIBE to learn data science with Python:
www.youtube.co...
JOIN the "Data School Insiders" community and receive exclusive rewards:
/ dataschool
== RESOURCES ==
GitHub repository for the series: github.com/jus...
"get_option" documentation: pandas.pydata.o...
"set_option" documentation: pandas.pydata.o...
"reset_option" documentation: pandas.pydata.o...
"describe_option" documentation: pandas.pydata.o...
More about options and settings: pandas.pydata.o...
== LET'S CONNECT! ==
Newsletter: www.dataschool...
Twitter: / justmarkham
Facebook: / datascienceschool
LinkedIn: / justmarkham

Пікірлер: 64
@LonglongFeng
@LonglongFeng 7 жыл бұрын
the best and most detail-oriented tutorial I've seen on KZbin. thanks
@dataschool
@dataschool 7 жыл бұрын
You are very welcome! Glad the videos are helpful to you!
@AbdallahProgrammer
@AbdallahProgrammer 2 ай бұрын
Thank you so much for this awesome playlist it is really helpful
@dataschool
@dataschool 2 ай бұрын
Glad it was helpful!
@noel2577
@noel2577 5 жыл бұрын
I have been hooked to your videos like a tv show ever since I watched the first one and I want to say that not only are these videos extremely useful and valuable but they are just as much entertaining as well. btw I've been hearing about some other, though not free, really powerful data analysis tools such as Alteryx and Pathwise. would absolutely love to watch if you create videos on those.
@dataschool
@dataschool 5 жыл бұрын
Thanks very much for your kind words! Also thanks for your suggestions 👍
@marty590
@marty590 8 жыл бұрын
Thanks Kevin.
@dataschool
@dataschool 8 жыл бұрын
You're very welcome! Hope it was helpful to you!
@fernandai.b.140
@fernandai.b.140 2 жыл бұрын
Thanks for the video, it is clear and easy to understand 👍
@dataschool
@dataschool Жыл бұрын
Glad it helped!
@benogidan
@benogidan 7 жыл бұрын
pd.set_option('display.float_format','{:,.0f}'.format) will get the decimal points off
@dataschool
@dataschool 7 жыл бұрын
Good to know, thank you!
@sindhumohandas1479
@sindhumohandas1479 3 жыл бұрын
Truly helpful video.. thankyou so much😊..
@dataschool
@dataschool 3 жыл бұрын
Glad it was helpful!
@hephepiyey
@hephepiyey 3 жыл бұрын
Hello there! Thank you for the explanation. So I was wondering if it's possible to set the column width to its max to show the numbers because I am seeing +06 in my column and I really wanted to show everything. Is that possible? Thank you!
@rajarshi_4479
@rajarshi_4479 4 жыл бұрын
How do we select the first 4 digits of each values in a column which is consisting of 10 digit numbers..can you plz make a video on it.. It's been of great help from all your videos
@dataschool
@dataschool 4 жыл бұрын
Use a string method. See this video: kzbin.info/www/bejne/mKDJknZmfsieftE
@FabioRBelotto
@FabioRBelotto Жыл бұрын
How do I set new default values or save my display changes even after restarting the IDE?
@nelson3391
@nelson3391 4 жыл бұрын
Thank you for the excellent explanation.
@sinabaghaei3504
@sinabaghaei3504 3 жыл бұрын
Thanks dear Kevin for explanation. My pandas File doesn't show set_option for numbers more than 10. it just shows None and less than 10. Can you please explain to me why is that? I use panda 1.1.3
@fadilyassin4597
@fadilyassin4597 9 ай бұрын
thank you for your videos very good explanations , can you please tell us how you show the grid in the Dataframe, your DataFrame looks like excel sheet please, thank you
@dataschool
@dataschool 7 ай бұрын
Great question! The formatting depends on your coding environment. I'm using Jupyter.
@PocketInfinite
@PocketInfinite 5 жыл бұрын
Is it possible to have it display in a nice table in IDLE like how it does in Jupyter? Jinja just won't work for me...
@dataschool
@dataschool 5 жыл бұрын
I'm not sure, sorry!
@suhasnalawade344
@suhasnalawade344 4 жыл бұрын
Thank you , information helped me
@saikannan665
@saikannan665 2 жыл бұрын
in my idle pandas the spaces between two columns is clumsy how can correct it can you please help me with it
@PavanKumar-wx6nl
@PavanKumar-wx6nl 4 жыл бұрын
How do i apply complete back ground color to entire pivot table with customized alignments inside text?
@dembobademboba6924
@dembobademboba6924 9 ай бұрын
Thank you. Very helpful
@dataschool
@dataschool 7 ай бұрын
You're welcome!
@kleczekr
@kleczekr 7 жыл бұрын
Hello Kevin! I am impressed by the quality of the material you provide on your channel. I have a brief question when it comes to the number formatting, which you explained in the video. Would it be difficult to introduce commas in non-standard places, e.g. to indicate Indian lakhs and crores, so that, e.g., to write 1 lakh rupees as 1,00,000; and 1 crore rupees as 1,00,00,000? Thank you for the wonderful series! Rafal
@dataschool
@dataschool 7 жыл бұрын
Thanks for your kind words! Regarding your question, it's not clear to me whether that is easy or even possible. I'd suggest reading the Python documentation on string formatting to find out: docs.python.org/2/library/string.html#custom-string-formatting
@kleczekr
@kleczekr 7 жыл бұрын
Thank you!
@shivamkakkar4779
@shivamkakkar4779 3 жыл бұрын
I want to know how your columns and rows are coming beautifully? As for me there are no lines when I run the CSV file in jupyter notebook
@dataschool
@dataschool 3 жыл бұрын
Depends on the version of Jupyter notebook
@fernandomancio2148
@fernandomancio2148 5 жыл бұрын
Great stuff! Really helpful! Tks
@dataschool
@dataschool 5 жыл бұрын
You're welcome!
@biganubhav
@biganubhav 3 жыл бұрын
How do you display the df in this nice table-like style within the jupyter notebook?
@dataschool
@dataschool 3 жыл бұрын
I think it depends on the version of Jupyter notebook you are using.
@meghasyam427
@meghasyam427 2 жыл бұрын
Hi Kevin, for somereason pd.set_option('display.float_format', '{:,}'.format) is not working for me nor throwing an error. The format is not getting applied. Can you help
@dataschool
@dataschool 2 жыл бұрын
Not sure off-hand, I'm sorry!
@sachavanweeren9578
@sachavanweeren9578 5 жыл бұрын
excellent tutorial. Thanks a lot!
@dataschool
@dataschool 5 жыл бұрын
You're very welcome!
@MrKingoverall
@MrKingoverall 5 жыл бұрын
THANKS MAN !!!!!!!!!!!!!! Yet again !!!!!!!!!!!!!
@dataschool
@dataschool 5 жыл бұрын
You're very welcome!
@faridlgifarikertabudi6508
@faridlgifarikertabudi6508 5 жыл бұрын
can we set float format for ONLY certain column? For example, i want to make float format for 'x' column, but NOT for other column. Please answer this master,. Thank you!
@dataschool
@dataschool 5 жыл бұрын
I don't think so, but I'm not sure!
@haifenghong4918
@haifenghong4918 6 жыл бұрын
Thank you, Kevin. I have one question: after pd.set_option('precision', 2),the precision of numbers in the 'Fare' column is 2, but why the precision of numbers in the 'Age' column is still 1?
@haifenghong4918
@haifenghong4918 6 жыл бұрын
And what's more, what is the difference between 'display.precision' and 'precision'? It seems that the results are the same in both cases.
@dataschool
@dataschool 6 жыл бұрын
display.precision and precision are the same, because pandas allows for partial matches in this case.
@skyvisionworld512
@skyvisionworld512 7 жыл бұрын
Hello Kevin, How do you remove comma from a data frame? (meaning doing the reverse of what we did here)
@dataschool
@dataschool 7 жыл бұрын
You probably need to use a string method. This video may help: kzbin.info/www/bejne/mKDJknZmfsieftE
@samkitjain7301
@samkitjain7301 5 жыл бұрын
What is the difference between labels and columns in functions like drop( )? Also, when I use X_train = train.drop(columns=['Survived'], inplace=True)) It gives output as None
@dataschool
@dataschool 5 жыл бұрын
Regarding drop, this video should help: kzbin.info/www/bejne/qpaYe6WJeLxggrs Regarding the None output, that's because of inplace. Hope that helps!
@Vinay_Gurram
@Vinay_Gurram 7 жыл бұрын
Can you please let me know - how to save the "output of IDLE" in windows ? - Thanks advance
@dataschool
@dataschool 7 жыл бұрын
I'm not sure, sorry!
@Vinay_Gurram
@Vinay_Gurram 7 жыл бұрын
Data School thanks for such a quick reply
@mutazkanaan6796
@mutazkanaan6796 6 жыл бұрын
thank you very much
@dataschool
@dataschool 6 жыл бұрын
You're welcome!
@kalpatarunayak5619
@kalpatarunayak5619 5 жыл бұрын
its not work in pycharm....plz help
@dataschool
@dataschool 4 жыл бұрын
Not sure how to help, sorry!
@MohamedTarek-td3tn
@MohamedTarek-td3tn 4 жыл бұрын
I'm using pycharm and it's work fine, make sure the series type is float .
@csbhaskar
@csbhaskar 5 жыл бұрын
thanks man
@dataschool
@dataschool 4 жыл бұрын
You're welcome!
@curtismoxam5382
@curtismoxam5382 3 жыл бұрын
Trick question, nothing is simple about Pandas
How do I create a pandas DataFrame from another object?
14:26
Data School
Рет қаралды 42 М.
How do I apply a function to a pandas Series or DataFrame?
17:58
Data School
Рет қаралды 201 М.
Алексей Щербаков разнес ВДВшников
00:47
Look at two different videos 😁 @karina-kola
00:11
Andrey Grechka
Рет қаралды 12 МЛН
艾莎撒娇得到王子的原谅#艾莎
00:24
在逃的公主
Рет қаралды 45 МЛН
Groupby - Data Analysis with Python and Pandas p.3
20:19
sentdex
Рет қаралды 90 М.
How do I avoid a SettingWithCopyWarning in pandas?
13:30
Data School
Рет қаралды 44 М.
25 Nooby Pandas Coding Mistakes You Should NEVER make.
11:30
Rob Mulla
Рет қаралды 266 М.
How do I select multiple rows and columns from a pandas DataFrame?
21:47
Pandas for Data Science in 20 Minutes | Python Crash Course
23:06
Nicholas Renotte
Рет қаралды 120 М.
What do I need to know about the pandas index? (Part 1)
13:37
Data School
Рет қаралды 134 М.
How to use the Pandas GroupBy function | Pandas tutorial
19:03
Mısra Turp
Рет қаралды 29 М.
Loop / Iterate over pandas DataFrame (2020)
11:05
Chart Explorers
Рет қаралды 81 М.
Алексей Щербаков разнес ВДВшников
00:47