If you're looking for a number you can use programatically then df.shape [0]. # empty dataframe, so convert to empty series Question what are the differences between the following commands
Aespa-‘Girls’ DF version PMV – com2star
The object 'df__tablename__columnname__1bf3d5bd' is dependent on column 'columnname'
Msg 4922, level 16, state 9, line 5 alter table drop column columnname failed because one or more objects access this column
I know how to drop the constraint, but the constraint's name changes everytime (the suffix changes). The book typically refers to columns of a dataframe as df['column'] however, sometimes without explanation the book uses df.column I don't understand the difference between the two. Df.values returns a numpy array with the underlying data of the dataframe, without any index or columns names
[:, 1:] is a slice of that array, that returns all rows and every column starting from the second column (the first column is index 0) I import a dataframe via read_csv, but for some reason can't extract the year or month from the series df['date'], trying that gives attributeerror 'series' object has no attribute 'year'
15 ok, lets check the man pages
While df is to show the file system usage, du is to report the file space usage Du works from files while df works at filesystem level, reporting what the kernel says it has available. Df.drop if it exists asked 5 years, 10 months ago modified 2 years, 8 months ago viewed 102k times I am assuming that df is a dataframe, but the edge cases are an empty dataframe, a dataframe of shape (1, 1), and a dataframe with more than one row in which case the use should implement their desired functionality